aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-theme-engine/src/lthemeengine-sstest/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core/lumina-theme-engine/src/lthemeengine-sstest/main.cpp')
-rw-r--r--src-qt5/core/lumina-theme-engine/src/lthemeengine-sstest/main.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine-sstest/main.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine-sstest/main.cpp
new file mode 100644
index 00000000..bdab0a30
--- /dev/null
+++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine-sstest/main.cpp
@@ -0,0 +1,18 @@
+#include <QApplication>
+//#include <QDebug>
+#include <QWidget>
+
+#include <LUtils.h>
+
+int main(int argc, char **argv){
+ if(argc<2){ return 1; } //error
+ unsetenv("QT_QPA_PLATFORMTHEME"); //Make sure we are not testing anything related to the current theme engine
+ QString stylesheet = LUtils::readFile(argv[1]).join("\n");
+ //qDebug() << "Found Stylesheet:" << stylesheet;
+ QApplication app(argc, argv);
+ app.setStyleSheet(stylesheet);
+ //qDebug() << " Using Stylesheet:" << app.styleSheet();
+ QWidget tmp(0,Qt::SplashScreen | Qt::BypassWindowManagerHint);
+ tmp.show(); //needed to actually run the parser on the stylesheet (unused/unchecked otherwise)
+ return 0;
+}
bgstack15