From kde-commits Sat Apr 14 23:40:01 2012 From: Stefan Majewsky Date: Sat, 14 Apr 2012 23:40:01 +0000 To: kde-commits Subject: KDE/kdegames Message-Id: <20120414234001.B7E74AC89B () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=133444691406227 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 +#include +#include #include #include @@ -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 -#include #include // 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 #include #include -#include #include #include --- 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