##// END OF EJS Templates
demoLauncher should now work on all platforms
Marek Rosa -
r2234:db665d87eeda
parent child
Show More
@@ -1,7 +1,8
1 !include( ../demos.pri ):error( "Couldn't find the demos.pri file!" )
1 !include( ../demos.pri ):error( "Couldn't find the demos.pri file!" )
2 include(charts/charts.pri)
3
2
4 TARGET = demoLauncher
3 TARGET = demoLauncher
5 SOURCES += main.cpp\
4 SOURCES += main.cpp\
6 widget.cpp
5 widget.cpp
7 HEADERS += widget.h
6 HEADERS += widget.h
7
8 DEFINES += "BINPATH=$$join($$CHART_BUILD_BIN_DIR, ", ")"
@@ -4,20 +4,22
4 #include <QGridLayout>
4 #include <QGridLayout>
5 #include <QApplication>
5 #include <QApplication>
6 #include <QProcess>
6 #include <QProcess>
7 #include <QTimer>
8
7
9 Widget::Widget(QWidget *parent)
8 Widget::Widget(QWidget *parent)
10 : QWidget(parent),
9 : QWidget(parent),
11 m_demoApp(0)
10 m_demoApp(0)
12 {
11 {
13 QList<QFileInfo> appList;
12 QList<QFileInfo> appList;
14
13 QDir appFolder = QDir(BINPATH);
15 QDir appFolder(QApplication::applicationDirPath());
16 appList = appFolder.entryInfoList(QDir::Files);
14 appList = appFolder.entryInfoList(QDir::Files);
17
15
18 for (int k = appList.count() - 1; k >= 0; k--) {
16 for (int k = appList.count() - 1; k >= 0; k--) {
19 QString name = appList[k].fileName();
17 QString name = appList[k].fileName();
20 if (name.endsWith("exp") || name.endsWith("dll") || name.endsWith("lib") || name.startsWith("tst_"))
18 if (name.endsWith("exp")
19 || name.endsWith("dll")
20 || name.endsWith("lib")
21 || name.startsWith("tst_")
22 || name.startsWith("demoLauncher"))
21 appList.removeAt(k);
23 appList.removeAt(k);
22 }
24 }
23
25
@@ -15,7 +15,6 public:
15
15
16 public slots:
16 public slots:
17 void runApp();
17 void runApp();
18 // void runAppShow();
19
18
20 private:
19 private:
21 QProcess *m_demoApp;
20 QProcess *m_demoApp;
General Comments 0
You need to be logged in to leave comments. Login now