diff options
author | Marek Rosa <marek.rosa@digia.com> | 2012-11-05 16:05:37 +0200 |
---|---|---|
committer | Marek Rosa <marek.rosa@digia.com> | 2012-11-05 16:26:39 +0200 |
commit | db665d87eeda2556726cf2306b1389c75dde4c9a (patch) | |
tree | 8889a6f3fa5b30c8ed5879f07ad03ee584a69dd4 /demos | |
parent | 222c26d04db8885396aa4ece76f96219a8c3e9d8 (diff) |
demoLauncher should now work on all platforms
Diffstat (limited to 'demos')
-rw-r--r-- | demos/demoLauncher/demoLauncher.pro | 3 | ||||
-rw-r--r-- | demos/demoLauncher/widget.cpp | 10 | ||||
-rw-r--r-- | demos/demoLauncher/widget.h | 1 |
3 files changed, 8 insertions, 6 deletions
diff --git a/demos/demoLauncher/demoLauncher.pro b/demos/demoLauncher/demoLauncher.pro index 8353a8d9..01ba2261 100644 --- a/demos/demoLauncher/demoLauncher.pro +++ b/demos/demoLauncher/demoLauncher.pro @@ -1,7 +1,8 @@ !include( ../demos.pri ):error( "Couldn't find the demos.pri file!" ) -include(charts/charts.pri) TARGET = demoLauncher SOURCES += main.cpp\ widget.cpp HEADERS += widget.h + +DEFINES += "BINPATH=$$join($$CHART_BUILD_BIN_DIR, ", ")" diff --git a/demos/demoLauncher/widget.cpp b/demos/demoLauncher/widget.cpp index c8edbda6..86c34c76 100644 --- a/demos/demoLauncher/widget.cpp +++ b/demos/demoLauncher/widget.cpp @@ -4,20 +4,22 @@ #include <QGridLayout> #include <QApplication> #include <QProcess> -#include <QTimer> Widget::Widget(QWidget *parent) : QWidget(parent), m_demoApp(0) { QList<QFileInfo> appList; - - QDir appFolder(QApplication::applicationDirPath()); + QDir appFolder = QDir(BINPATH); appList = appFolder.entryInfoList(QDir::Files); for (int k = appList.count() - 1; k >= 0; k--) { QString name = appList[k].fileName(); - if (name.endsWith("exp") || name.endsWith("dll") || name.endsWith("lib") || name.startsWith("tst_")) + if (name.endsWith("exp") + || name.endsWith("dll") + || name.endsWith("lib") + || name.startsWith("tst_") + || name.startsWith("demoLauncher")) appList.removeAt(k); } diff --git a/demos/demoLauncher/widget.h b/demos/demoLauncher/widget.h index 1a8a7858..863b7df2 100644 --- a/demos/demoLauncher/widget.h +++ b/demos/demoLauncher/widget.h @@ -15,7 +15,6 @@ public: public slots: void runApp(); -// void runAppShow(); private: QProcess *m_demoApp; |