[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdegames
From:       Stefan Majewsky <majewsky () gmx ! net>
Date:       2012-04-14 23:40:01
Message-ID: 20120414234001.B7E74AC89B () svn ! kde ! org
[Download RAW message or body]

SVN commit 1289572 by majewsky:

Remove two simple KGameTheme usages (KJumpingCube, KSirk), fix doc typo.

 M  +7 -4      kjumpingcube/kcubeboxwidget.cpp  
 M  +0 -2      kjumpingcube/kcubeboxwidget.h  
 M  +0 -1      ksirk/ksirk/Dialogs/newGameDialogImpl.cpp  
 M  +5 -5      libkdegames/kgtheme.h  


--- trunk/KDE/kdegames/kjumpingcube/kcubeboxwidget.cpp #1289571:1289572
@@ -21,7 +21,8 @@
 **************************************************************************** */
 #include "kcubeboxwidget.h"
 
-#include <KConfig>
+#include <KgTheme>
+#include <KStandardDirs>
 #include <QTimer>
 #include <QPainter>
 
@@ -443,16 +444,18 @@
    color2 = Prefs::color2();
    color0 = Prefs::color0();
 
-   theme.load ("pics/default.desktop");
+   KgTheme theme((QByteArray()));
+   theme.readFromDesktopFile(KStandardDirs::locate("appdata", "pics/default.desktop"));
+
    t.start();
    qDebug() << t.restart() << "msec";
-   svg.load (theme.graphics());
+   svg.load (theme.graphicsPath());
    qDebug() << t.restart() << "msec" << "SVG loaded ...";
    if (svg.isValid())
 	qDebug() << "SVG is valid ...";
    else
 	qDebug() << "SVG is NOT valid ...";
-   drawHairlines = (theme.property("DrawHairlines") == "0") ? false : true;
+   drawHairlines = (theme.customData("DrawHairlines") == "0") ? false : true;
 
    initCubes();
 
--- trunk/KDE/kdegames/kjumpingcube/kcubeboxwidget.h #1289571:1289572
@@ -23,7 +23,6 @@
 #define KCUBEBOXWIDGET_H
 
 #include <QSvgRenderer>
-#include <kgametheme.h>
 #include <QTime> // IDW
 
 #include "cubeboxbase.h"
@@ -152,7 +151,6 @@
    void init();
 
    QSvgRenderer svg;
-   KGameTheme theme;		// A graphics theme for KJumpingCube.
    QTime t; // IDW
    void makeSVGBackground (const int w, const int h);
    void makeSVGCubes (const int width);
--- trunk/KDE/kdegames/ksirk/ksirk/Dialogs/newGameDialogImpl.cpp #1289571:1289572
@@ -27,7 +27,6 @@
 #include <KStandardDirs>
 #include <KMessageBox>
 #include <KConfigDialog>
-#include <KGameThemeSelector>
 #include <knewstuff3/downloaddialog.h>
 
 #include <qdir.h>
--- trunk/KDE/kdegames/libkdegames/kgtheme.h #1289571:1289572
@@ -41,10 +41,10 @@
  *
  * @section fileformat Default file format for theme descriptions
  *
- * Although KgTheme and KgThemeProvider special theme description files for most
- * basic usage, there is a format for theme description files based on the
- * XDG Desktop File Specification. The following example shows the recognized
- * keys:
+ * Although KgTheme and KgThemeProvider do not need special theme description
+ * files for most basic usage, there is a format for theme description files
+ * based on the XDG Desktop File Specification. The following example shows the
+ * recognized keys:
  *
  * @code
  * [KGameTheme]
@@ -62,7 +62,7 @@
  * "FileName" and "Preview" are resolved relative to the directory that contains
  * the theme description file.
  *
- * If the "KGameTheme" group contains any further keys, their values can be
+ * If the [KGameTheme] group contains any further keys, their values can be
  * retrieved through the KgTheme::customData() method.
  */
 class KDEGAMES_EXPORT KgTheme : public QObject
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic