[kde-doc-english] [kpat/frameworks] /: Port++

Montel Laurent montel at kde.org
Sun Jan 4 08:51:46 UTC 2015


Git commit 195d0ed94c8d7966d239c321139db4885446bed3 by Montel Laurent.
Committed on 04/01/2015 at 08:43.
Pushed by mlaurent into branch 'frameworks'.

Port++

M  +1    -0    dealer.cpp
M  +1    -1    doc/CMakeLists.txt
M  +1    -1    doc/index.docbook
M  +1    -1    libkcardgame/CMakeLists.txt
M  +4    -3    libkcardgame/kcardthemewidget.cpp
M  +1    -2    libkcardgame/kcardthemewidget_p.h
M  +8    -8    main.cpp
M  +2    -2    mainwindow.cpp
M  +17   -17   mainwindow.h

http://commits.kde.org/kpat/195d0ed94c8d7966d239c321139db4885446bed3

diff --git a/dealer.cpp b/dealer.cpp
index aedb26b..b0758be 100644
--- a/dealer.cpp
+++ b/dealer.cpp
@@ -46,6 +46,7 @@
 
 #include "KCardTheme"
 
+#include <KGlobal>
 #include <KConfigGroup>
 #include <KDebug>
 #include <KLocalizedString>
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index ac704f8..65fa3f0 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -2,4 +2,4 @@
 #
 #
 
-kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kpat)
+kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kpat)
diff --git a/doc/index.docbook b/doc/index.docbook
index 86da4a8..00ca3ee 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -1,6 +1,6 @@
 <?xml version="1.0" ?>
 <!--IMPORTANT: please note that'do not change this!' notice does not apply to translators -->
-<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
+<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.5-Based Variant V1.1//EN" "dtd/kdedbx45.dtd" [
   <!ENTITY kappname "&kpatience;">
   <!ENTITY kappversion "3.6"><!--Applicaion version. Use this variable everywhere it's needed.-->
   <!ENTITY package "kdegames">  <!-- do not change this! -->
diff --git a/libkcardgame/CMakeLists.txt b/libkcardgame/CMakeLists.txt
index 0c417cb..21eee4b 100644
--- a/libkcardgame/CMakeLists.txt
+++ b/libkcardgame/CMakeLists.txt
@@ -9,7 +9,7 @@ set( libkcardgame_SRCS
 )
 
 add_library( kcardgame SHARED ${libkcardgame_SRCS} )
-target_link_libraries( kcardgame KF5KDEGames KF5::NewStuff KF5::KDELibs4Support KF5::GuiAddons)
+target_link_libraries( kcardgame KF5KDEGames KF5::NewStuff KF5::KDELibs4Support KF5::GuiAddons Qt5::Svg)
 
 install( TARGETS kcardgame ${INSTALL_TARGETS_DEFAULT_ARGS} )
 install( FILES kcardtheme.knsrc  DESTINATION  ${CONFIG_INSTALL_DIR} )
diff --git a/libkcardgame/kcardthemewidget.cpp b/libkcardgame/kcardthemewidget.cpp
index 075a3ee..b1ae3ff 100644
--- a/libkcardgame/kcardthemewidget.cpp
+++ b/libkcardgame/kcardthemewidget.cpp
@@ -23,6 +23,7 @@
 #include <KImageCache>
 #include <KConfigDialog>
 #include <KDebug>
+#include <KDialog>
 #include <KLineEdit>
 #include <KLocale>
 #include <KGlobal>
@@ -396,7 +397,7 @@ KCardThemeWidget::KCardThemeWidget( const QSet<QString> & requiredFeatures, cons
     connect( d->listView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), d, SLOT(updateLineEdit(QModelIndex)) );
     connect( d->hiddenLineEdit, SIGNAL(textChanged(QString)), d, SLOT(updateListView(QString)) );
 
-    d->newDeckButton = new KPushButton( KIcon( QLatin1String( "get-hot-new-stuff") ), i18n("Get New Card Decks..." ), this );
+    d->newDeckButton = new KPushButton( QIcon::fromTheme( QLatin1String( "get-hot-new-stuff") ), i18n("Get New Card Decks..." ), this );
     connect( d->newDeckButton, SIGNAL(clicked(bool)), d, SLOT(getNewCardThemes()) );
 
     QHBoxLayout * hLayout = new QHBoxLayout();
@@ -440,8 +441,8 @@ KCardThemeDialog::KCardThemeDialog( QWidget * parent, KConfigSkeleton * config,
     addPage( new KCardThemeWidget( requiredFeatures, previewString, this ), QString() );
 
     setFaceType( KPageDialog::Plain );
-    setButtons( KDialog::Ok | KDialog::Apply | KDialog::Cancel );
-    showButtonSeparator( false );
+    //QT5 setButtons( KDialog::Ok | KDialog::Apply | KDialog::Cancel );
+    //QT5 showButtonSeparator( false );
 }
 
 
diff --git a/libkcardgame/kcardthemewidget_p.h b/libkcardgame/kcardthemewidget_p.h
index aec996e..1b233b2 100644
--- a/libkcardgame/kcardthemewidget_p.h
+++ b/libkcardgame/kcardthemewidget_p.h
@@ -23,8 +23,7 @@
 #include "kcardthemewidget.h"
 
 #include "kcardtheme.h"
-
-class KImageCache;
+#include <KImageCache>
 class KLineEdit;
 class KPushButton;
 
diff --git a/main.cpp b/main.cpp
index 8e110ac..56b08ea 100644
--- a/main.cpp
+++ b/main.cpp
@@ -43,7 +43,7 @@
 #include "KCardTheme"
 #include "KCardDeck"
 
-#include <KAboutData>
+#include <K4AboutData>
 #include <KApplication>
 #include <KCmdLineArgs>
 #include <KDebug>
@@ -100,12 +100,12 @@ QString lowerAlphaNum( const QString & string )
 
 int main( int argc, char **argv )
 {
-    KAboutData aboutData( "kpat",
+    K4AboutData aboutData( "kpat",
                           0,
                           ki18n("KPatience"),
                           KPAT_VERSION,
                           ki18n("KDE Patience Game"),
-                          KAboutData::License_GPL_V2,
+                          K4AboutData::License_GPL_V2,
                           ki18n("© 1995 Paul Olav Tvete\n© 2000 Stephan Kulow"),
                           KLocalizedString(),
                           "http://games.kde.org/kpat" );
@@ -164,13 +164,13 @@ int main( int argc, char **argv )
     foreach ( const DealerInfo *di, DealerInfoList::self()->games() )
     {
         KLocalizedString localizedKey = ki18n( di->untranslatedBaseName().constData() );
-        const QString translatedKey = lowerAlphaNum( localizedKey.toString( tmpLocale ) );
-        gameList << translatedKey;
-        indexMap.insert( translatedKey, di->baseId() );
+        //QT5 const QString translatedKey = lowerAlphaNum( localizedKey.toString( tmpLocale ) );
+        //QT5 gameList << translatedKey;
+        //QT5 indexMap.insert( translatedKey, di->baseId() );
         indexMap.insert( di->baseIdString(), di->baseId() );
     }
     gameList.sort();
-    const QString listSeparator = ki18nc( "List separator", ", " ).toString( tmpLocale );
+    //QT5 const QString listSeparator = ki18nc( "List separator", ", " ).toString( tmpLocale );
     delete tmpLocale;
 
     KCmdLineArgs::init( argc, argv, &aboutData );
@@ -180,7 +180,7 @@ int main( int argc, char **argv )
     options.add("solve <num>", ki18n("Dealer to solve (debug)" ));
     options.add("start <num>", ki18n("Game range start (default 0:INT_MAX)" ));
     options.add("end <num>", ki18n("Game range end (default start:start if start given)" ));
-    options.add("gametype <game>", ki18n("Skip the selection screen and load a particular game type. Valid values are: %1").subs(gameList.join(listSeparator)));
+    //QT5 options.add("gametype <game>", ki18n("Skip the selection screen and load a particular game type. Valid values are: %1").subs(gameList.join(listSeparator)));
     options.add("testdir <directory>", ki18n( "Directory with test cases" ) );
     options.add("generate", ki18n( "Generate random test cases" ) );
     options.add("+file", ki18n("File to load"));
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 08014eb..b136200 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -57,7 +57,7 @@
 #include <KStandardGameAction>
 #include <KStandardAction>
 
-#include <KAction>
+#include <QAction>
 #include <KActionCollection>
 #include <KConfigDialog>
 #include <KDebug>
@@ -146,7 +146,7 @@ MainWindow::~MainWindow()
 
 void MainWindow::setupActions()
 {
-    KAction *a;
+    QAction *a;
 
     // Game Menu
     a = actionCollection()->addAction( QLatin1String( "new_game" ));
diff --git a/mainwindow.h b/mainwindow.h
index 1bca43a..be0b7df 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -48,7 +48,7 @@ class SoundEngine;
 
 class KCardDeck;
 
-class KAction;
+class QAction;
 class KRecentFilesAction;
 class KToggleAction;
 class KUrl;
@@ -122,29 +122,29 @@ private:
     void updateSoundEngine();
 
     // Members
-    KAction * m_leftAction;
-    KAction * m_rightAction;
-    KAction * m_upAction;
-    KAction * m_downAction;
-    KAction * m_cancelAction;
-    KAction * m_pickUpSetDownAction;    
+    QAction * m_leftAction;
+    QAction * m_rightAction;
+    QAction * m_upAction;
+    QAction * m_downAction;
+    QAction * m_cancelAction;
+    QAction * m_pickUpSetDownAction;    
 
     KRecentFilesAction * m_recentFilesAction;
-    KAction * m_saveAction;
-    KAction * m_undoAction;
-    KAction * m_redoAction;
-    KAction * m_demoAction;
-    KAction * m_hintAction;
-    KAction * m_drawAction;
-    KAction * m_dealAction;
-    KAction * m_redealAction;
-    KAction * m_dropAction;
+    QAction * m_saveAction;
+    QAction * m_undoAction;
+    QAction * m_redoAction;
+    QAction * m_demoAction;
+    QAction * m_hintAction;
+    QAction * m_drawAction;
+    QAction * m_dealAction;
+    QAction * m_redealAction;
+    QAction * m_dropAction;
     KToggleAction * m_autoDropEnabledAction;
     KToggleAction * m_solverEnabledAction;
     KToggleAction * m_rememberStateAction;
     KToggleAction * m_playSoundsAction;
     KToggleAction * m_showMenubarAction;
-    KAction * m_gameHelpAction;
+    QAction * m_gameHelpAction;
 
     QMap<int, const DealerInfo*>  m_dealer_map;
     QMap<int, const DealerInfo*>::const_iterator  m_dealer_it;



More information about the kde-doc-english mailing list