# HG changeset patch # User unc0rr # Date 1168617885 0 # Node ID 1148eeb0557e3a2a2a69ac6b48c3c20b833f778d # Parent 1ee7f087195a80d57e03067c692897d143980df4 Oops, fix the build diff -r 1ee7f087195a -r 1148eeb0557e QTfrontend/gameuiconfig.cpp --- a/QTfrontend/gameuiconfig.cpp Fri Jan 12 15:23:16 2007 +0000 +++ b/QTfrontend/gameuiconfig.cpp Fri Jan 12 16:04:45 2007 +0000 @@ -17,7 +17,6 @@ */ #include -#include #include "gameuiconfig.h" #include "hwform.h" #include "pages.h" diff -r 1ee7f087195a -r 1148eeb0557e QTfrontend/gameuiconfig.h --- a/QTfrontend/gameuiconfig.h Fri Jan 12 15:23:16 2007 +0000 +++ b/QTfrontend/gameuiconfig.h Fri Jan 12 16:04:45 2007 +0000 @@ -20,7 +20,6 @@ #define GAMECONFIG_H #include -#include #include class HWForm; diff -r 1ee7f087195a -r 1148eeb0557e QTfrontend/hwconsts.h.in --- a/QTfrontend/hwconsts.h.in Fri Jan 12 15:23:16 2007 +0000 +++ b/QTfrontend/hwconsts.h.in Fri Jan 12 16:04:45 2007 +0000 @@ -28,5 +28,6 @@ extern QDir * cfgdir; extern QDir * datadir; extern QDir * bindir; +extern QStringList * Themes; const QString cProtoVer("${HEDGEWARS_PROTO_VER}"); diff -r 1ee7f087195a -r 1148eeb0557e QTfrontend/main.cpp.in --- a/QTfrontend/main.cpp.in Fri Jan 12 15:23:16 2007 +0000 +++ b/QTfrontend/main.cpp.in Fri Jan 12 16:04:45 2007 +0000 @@ -22,12 +22,14 @@ #include #include #include +#include #include "hwform.h" #include "hwconsts.h" QDir * bindir; QDir * cfgdir; QDir * datadir; +QStringList * Themes; bool checkForDir(const QString & dir) { @@ -80,6 +82,20 @@ return 1; } + Themes = new QStringList(); + QFile themesfile(datadir->absolutePath() + "/Themes/themes.cfg"); + if (themesfile.open(QIODevice::ReadOnly)) { + QTextStream stream(&themesfile); + QString str; + while (!stream.atEnd()) + { + Themes->append(stream.readLine()); + } + themesfile.close(); + } else { + QMessageBox::critical(0, "Error", "Cannot access themes.cfg", "OK"); + } + HWForm *Form = new HWForm(); Form->show(); return app.exec();