diff options
| author | Christoph Berg <christoph.berg@credativ.de> | 2019-03-11 14:21:27 +0100 |
|---|---|---|
| committer | Christoph Berg <christoph.berg@credativ.de> | 2019-03-11 14:21:27 +0100 |
| commit | 8c76e27e9f157f37e1f3c930f76c2522d25ff091 (patch) | |
| tree | c5dab105e64c191047793997c869773db020c6ec /UDPExamples/MessageAggregator.cpp | |
| parent | fa2daec5ce5510e373c53b987fa4b21a310987f6 (diff) | |
| parent | 200de07a95209a55d6019ba87f0abc78d302bf4c (diff) | |
Update upstream source from tag 'upstream/2.0.1+repack'
Update to upstream version '2.0.1+repack'
with Debian dir f7e347d4250c45b22e01a489f197c55fb378ba9c
Diffstat (limited to 'UDPExamples/MessageAggregator.cpp')
| -rw-r--r-- | UDPExamples/MessageAggregator.cpp | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/UDPExamples/MessageAggregator.cpp b/UDPExamples/MessageAggregator.cpp index 81515ac0..52124045 100644 --- a/UDPExamples/MessageAggregator.cpp +++ b/UDPExamples/MessageAggregator.cpp @@ -63,14 +63,29 @@ int main (int argc, char * argv[]) QObject::connect (&app, SIGNAL (lastWindowClosed ()), &app, SLOT (quit ())); { - QFile file {":/qss/default.qss"}; - if (!file.open (QFile::ReadOnly)) + QString ss; + auto sf = qApp->styleSheet (); + if (sf.size ()) { - throw std::runtime_error { - QString {"failed to open \"" + file.fileName () + "\": " + file.errorString ()} - .toLocal8Bit ().constData ()}; + sf.remove ("file:///"); + QFile file {sf}; + if (!file.open (QFile::ReadOnly)) + { + throw std::runtime_error { + QString {"failed to open \"" + file.fileName () + "\": " + file.errorString ()}.toStdString ()}; + } + ss += file.readAll (); } - app.setStyleSheet (file.readAll()); + { + QFile file {":/qss/default.qss"}; + if (!file.open (QFile::ReadOnly)) + { + throw std::runtime_error { + QString {"failed to open \"" + file.fileName () + "\": " + file.errorString ()}.toStdString ()}; + } + ss += file.readAll (); + } + app.setStyleSheet (ss); } MessageAggregatorMainWindow window; |
