aboutsummaryrefslogtreecommitdiffstats
path: root/src/controls/qquickstyleselector.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QQuickStyleSelector: optimize string usageAnton Kudryavtsev2016-03-291-12/+12
| | | | | | | De-duplicate calls and cache results. Change-Id: Ia3424ac5149b947530e724b07adbff95cb54faf7 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Cleanup QQuickStyleSelectorJ-P Nurmi2016-03-181-107/+79
| | | | | | | | | Remove some unneeded cruft that originates from QFileSelector and what we don't need in this specialized selector. Also, fix the header guards and include directives to use the same convention than all other classes. Change-Id: I728beba1156c0934bd0dd171038fc7560a556708 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add public API for setting and getting the style from C++J-P Nurmi2016-03-171-42/+37
| | | | | | | | TODO: setup QtLabsControls C++ module docs Task-number: QTBUG-50787 Change-Id: I382bad34df88d13fb9a74b3d2f9203280dfb4a66 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QQuickStyleSelector::select() takes a file _name_J-P Nurmi2016-03-171-2/+2
| | | | | | | | Don't hard-code "/" in qtlabscontrolsplugin.cpp, because it won't work with the upcoming style path configuration via QQuickStyle . Change-Id: I32c178361f16c449f81abbb34d7b3ee7daf01fce Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename QQuickStyle to QQuickStyleAttachedJ-P Nurmi2016-03-161-2/+2
| | | | | | | | Make room for a public QQuickStyle class for configuring the style. Task-number: QTBUG-50787 Change-Id: I2a43436dd1815e3acd7e896a5847e41db42af5c4 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QQuickStyleSelector: remove QFile headerAnton Kudryavtsev2016-02-111-2/+1
| | | | | | | | | ... and replace QFile::exists() with QFileInfo::exists(). Only exists() is used from QFile. But the same function there is in QFileInfo, that already is included. Change-Id: I4b812951f7c85232b62bc7188620f98578145294 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into devJ-P Nurmi2016-01-311-24/+17
|\ | | | | | | | | | | | | | | | | Conflicts: src/templates/qquickpopup.cpp src/templates/qquickpopup_p_p.h src/templates/qquickspinbox_p.h Change-Id: Ief25ad2d27410f62e90879f60499ed87359406c3
| * Move QQuickStyleSelector::allSelector() to privateJ-P Nurmi2016-01-291-9/+8
| | | | | | | | | | Change-Id: I6ba9d1c41b2ab6766faef6cdbdfb780e6ca37dfd Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
| * QQuickStyleSelector: merge select() overloadsJ-P Nurmi2016-01-291-17/+11
| | | | | | | | | | | | | | Only one is used. Cleanup the API a bit by merging the two. Change-Id: I90d72e754442aef45e9d1bc3f86004cad511a726 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devJ-P Nurmi2016-01-191-2/+2
|\| | | | | | | | | | | | | Conflicts: src/controls/qquickstyle.cpp Change-Id: I1c8273012b01726072e5cbfd4369453a780ff03e
| * QQuickStyleSelector: replace QStringLiteral with QLatin1StringAnton Kudryavtsev2016-01-181-2/+2
| | | | | | | | | | | | | | ... in string comparisons. It's more effective. Change-Id: I9513a4e5c4ca56a1ef9f24c88d82a4559d8d559e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Controls: replace foreach with range-based forAnton Kudryavtsev2016-01-151-1/+1
|/ | | | | Change-Id: I3ad37008e2cdcde62efecfb5e2ec2373026c4439 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickStyleSelector: don't include an empty style name as a selectorJ-P Nurmi2015-12-231-1/+4
| | | | | | | | | | | | | | | | | | | This solves the recently surfaced QML import issue: ASSERT failure in QQmlImportDatabase::importDynamicPlugin: "Internal error: Plugin imported previously with different uri", file /home/qt/work/qt/qtdeclarative/src/qml/qml/qqmlimport.cpp, line 1947 Because QQuickStyleSelector included double slashes, the path ("Qt/labs/controls//") got converted to a uri with an extra dot in the end ("Qt.labs.controls."), which conflicted with the actual uri "Qt.labs.controls". Somehow related to qtbase commit 2e1de7f which changed QUrl behavior with local files. Change-Id: I8236a685a68dcffcd5f03c439236b2e8ea04492e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Make QQuickStyleSelector case-insensitiveJ-P Nurmi2015-12-141-3/+3
| | | | | | | | | | | | | | | | | This is especially nice for qtlabscontrols.conf: [Controls] Style=material vs. [Controls] Style=Material Previously, only the first syntax worked. Change-Id: Ib4a47dca002acb5c0227f3dcfea7251296f8386e Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Remove QQuickStyleSelector::instance()J-P Nurmi2015-12-141-6/+0
| | | | | | | | | | | It was a bad idea to share the same instance, because non-thread-safe instance() ends up being called from multiple threads. Let the style plugins create their own instances instead, QQuickStyleSelector ctor is not that heavy and there's no such shared state as originally was anticipated. Change-Id: Ie23091c6dd50f5d7abbab3b996da4471054da89a Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Read preferred style from qtlabscontrols.confJ-P Nurmi2015-12-141-0/+7
| | | | | Change-Id: I3aeed5c8316a099eed5ea8df25711193ee3c7d90 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QQuickStyleSelector: don't inherit QObjectJ-P Nurmi2015-12-021-16/+8
| | | | | | | | Fixes the "QObject: Cannot create children for a parent that is in a different thread." -warnings. Change-Id: I94ed34c6c4c7a6b6507e91e74a354630b0ad6d04 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* QQuickStyleSelector: add instance() static methodLiang Qi2015-11-301-0/+8
| | | | | Change-Id: Id2a412175f9907651d8e4e0fdacb624ac2444552 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickStyleSelector: move the style detection to constructorLiang Qi2015-11-301-6/+7
| | | | | | | Command line argument has more priority than environment variable. Change-Id: Id76f703d1d4395b6bae1a2e6be162a9250fb8dfa Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickStyleSelector: removed the env overrideLiang Qi2015-11-301-6/+0
| | | | | Change-Id: I0e42b339ddfff81ad9029cfbff14e21aee5178ff Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Rename QQuickFileSelector to QQuickStyleSelectorLiang Qi2015-11-261-0/+235
Also moved to QtLabsControls lib. Change-Id: I8ed1256da2b9aa63db4ca3b51a0ace3ba730e542 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>