From db665d87eeda2556726cf2306b1389c75dde4c9a 2012-11-05 14:26:39 From: Marek Rosa Date: 2012-11-05 14:26:39 Subject: [PATCH] demoLauncher should now work on all platforms --- diff --git a/demos/demoLauncher/demoLauncher.pro b/demos/demoLauncher/demoLauncher.pro index 8353a8d..01ba226 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 c8edbda..86c34c7 100644 --- a/demos/demoLauncher/widget.cpp +++ b/demos/demoLauncher/widget.cpp @@ -4,20 +4,22 @@ #include #include #include -#include Widget::Widget(QWidget *parent) : QWidget(parent), m_demoApp(0) { QList 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 1a8a785..863b7df 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;