diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-11-29 12:06:45 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-04 12:07:58 +0100 |
commit | 17333720e05bbe5d84d246c0850c8c2c047a141e (patch) | |
tree | f916a46b939d04ea70667e05205e5d1fbdcf43b1 /src/plugins/platforms/minimal/qminimalintegration.h | |
parent | 03ae80359f8b0cb39ae5e95902383869314716d9 (diff) |
Minimal plugin: Use a dummy font database for command line tools.
Suppress warnings like:
QFontDatabase: Cannot find font directory '...' - is Qt installed correctly?
occurring for example when using qmlplugindump.
Add option flags (similar to Windows plugin) to the integration
class to be used for QT_DEBUG_BACKINGSTORE and other functionality.
Add a dummy font database with empty populate() function to be
used unless the debug flag for the backing store is used.
Task-number: QTBUG-33674
Task-number: QTCREATORBUG-10685
Change-Id: I7eaff3025de12e6b0471a3430f986b0cd810e22c
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/plugins/platforms/minimal/qminimalintegration.h')
-rw-r--r-- | src/plugins/platforms/minimal/qminimalintegration.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/plugins/platforms/minimal/qminimalintegration.h b/src/plugins/platforms/minimal/qminimalintegration.h index 7dc01e1d51..a737057085 100644 --- a/src/plugins/platforms/minimal/qminimalintegration.h +++ b/src/plugins/platforms/minimal/qminimalintegration.h @@ -67,13 +67,28 @@ public: class QMinimalIntegration : public QPlatformIntegration { public: - QMinimalIntegration(); + enum Options { // Options to be passed on command line or determined from environment + DebugBackingStore = 0x1, + EnableFonts = 0x2 + }; + + explicit QMinimalIntegration(const QStringList ¶meters); + ~QMinimalIntegration(); bool hasCapability(QPlatformIntegration::Capability cap) const; + QPlatformFontDatabase *fontDatabase() const; QPlatformWindow *createPlatformWindow(QWindow *window) const; QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const; QAbstractEventDispatcher *createEventDispatcher() const; + + unsigned options() const { return m_options; } + + static QMinimalIntegration *instance(); + +private: + mutable QPlatformFontDatabase *m_dummyFontDatabase; + unsigned m_options; }; QT_END_NAMESPACE |