Skip to content

Commit f7cffb0

Browse files
add xcb plugin presence test
1 parent 5119895 commit f7cffb0

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ Makefile
1919
run-tests.sh
2020
tests.pro
2121
/.qmake.stash
22+
tests/build-*
23+
*.pro.user*

Diff for: tests/xcb-plugin/main.cpp

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include <QDebug>
2+
#include <QDir>
3+
//#define PLUGIN_DIR "plugindir"
4+
int main() {
5+
QString platformDir = QString(PLUGIN_DIR) + "\\platforms";
6+
QDir pluginDir(platformDir);
7+
QStringList platformPlugins = pluginDir.entryList();
8+
qDebug() << "plugins found in file system: " << platformPlugins;
9+
if (platformPlugins.contains("libqxcb.so")) {
10+
qDebug() << "xcb plugin found";
11+
return 0;
12+
}
13+
qDebug() << "xcb plugin not found";
14+
return 1;
15+
}

Diff for: tests/xcb-plugin/xcb-plugin.pro

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
QT += core
2+
QT -= gui
3+
TARGET = xcb-plugin
4+
CONFIG += console
5+
TEMPLATE = app
6+
SOURCES += main.cpp
7+
DEFINES += PLUGIN_DIR=\\\"$$[QT_INSTALL_PLUGINS]\\\"

0 commit comments

Comments
 (0)