summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRichard J. Moore <rich@kde.org>2013-09-08 11:43:23 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-09 22:45:19 +0200
commit8aaf6a3070b2ff1cab1fa79a79fb16e2768e1e53 (patch)
treec1d1b988a7228e6e4c64c44f05affb6301b35d37 /tests
parent9c45260942c0ee32267e651d981bfa33a6acb64d (diff)
downloadqtx11extras-8aaf6a3070b2ff1cab1fa79a79fb16e2768e1e53.tar.gz
Add a method to let users determine if the current platform is X11.v5.2.0-alpha1
In order to know if the methods in QtX11Extras are usable the user should have a way to tell if they're running on X11. Change-Id: I096267eb1f1fe07ee11811574a96100389c33b7d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qx11info/tst_qx11info.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qx11info/tst_qx11info.cpp b/tests/auto/qx11info/tst_qx11info.cpp
index b680834..ab741be 100644
--- a/tests/auto/qx11info/tst_qx11info.cpp
+++ b/tests/auto/qx11info/tst_qx11info.cpp
@@ -52,6 +52,7 @@ class tst_QX11Info : public QObject
private slots:
void staticFunctionsBeforeQApplication();
+ void isPlatformX11();
void appTime();
};
@@ -120,6 +121,14 @@ void tst_QX11Info::staticFunctionsBeforeQApplication()
QCOMPARE(appTime, 0ul);
}
+void tst_QX11Info::isPlatformX11()
+{
+ int argc = 0;
+ QApplication app(argc, 0);
+
+ QVERIFY(QX11Info::isPlatformX11());
+}
+
void tst_QX11Info::appTime()
{
int argc = 0;