summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
Commit message (Collapse)AuthorAgeFilesLines
* Windows: Fix helper routine for formatting errors.Friedemann Kleint2012-05-071-17/+19
| | | | | | | Some return values were empty, or missing. Use QByteArrayLiteral. Change-Id: Ib9f124dea1245c000c53098164bf29e78eaa13d2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QPA plugins]Thiago Macieira2012-05-041-1/+1
| | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I4aef078ea87ecd3699de107d1e9352d9fb6d6e39 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Windows: Fix QWindowsNativeFileDialogBase::directory()Friedemann Kleint2012-05-031-2/+3
| | | | | | | | The item was never initialized. Change-Id: Iaf404c7f601713886c1c1346cc145460e7e89171 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fixed windows platform plugin with -qtnamespace.Rohan McGovern2012-05-022-0/+8
| | | | | | | Added missing QT_BEGIN_NAMESPACE/QT_END_NAMESPACE Change-Id: I2ffc5ec18d19027c01c81ba9c29f6d7cac5e9619 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Support all modality types in QPlatformDialogHelperBradley T. Hughes2012-04-302-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Modality is not a boolean property in Qt. There are 2 types: window modality and application modality. Native dialogs can support both of these types as well (e.g. on Cocoa, a window modal file dialog should be displayed as a Sheet). Remove the QPlatformDialogHelper::ShowFlags enum and instead pass a Qt::WindowModality parameter to QPlatformDialogHelper::show_sys(). The Windows implementation has been updated to check for Qt::ApplicationModal instead of the ShowModal flag (since only Qt::ApplicationModal dialogs are blocking). The Cocoa implementation has been updated to only use non-modal and application modal native color and font dialogs (which restores Qt 4 behavior). These are shared Cocoa panels that cannot be shown as sheets, however. If the programmer asks for window modal color/font dialogs, we use the Qt versions, not the native ones. The file dialog can be shown either as a Sheet (but we need to pass an NSWindow parent for it to work properly) or as an application modal dialog. This change has been tested on Mac OS X with tests/manual/windowmodality. Change-Id: I9064987433895c55f68aac979ef8e8207fb24bbe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix the tst_QOpenGL::sharedResourceCleanup() test case in WindowsMiikka Heikkinen2012-04-301-0/+1
| | | | | | | | | QWindowsGLContext was returning always false for isSharing() query, as it was falling back to default implementation. Task-number: QTBUG-24192 Change-Id: I884d559d69545ef85a0d07d7287bc50ce459c1bd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove declaration of QWindowsFontEngine::createEngine()Miikka Heikkinen2012-04-301-5/+0
| | | | | | | | | There is no implementation for this function so might as well remove the declaration. The function is actually implemented by QWindowsFontDatabase class, where it is also properly declared. Change-Id: I8f5c050fa3f3c48b07e10f205eb0f7b16e12b737 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QWindowsBackingStore: Flush to correct window.Friedemann Kleint2012-04-271-1/+2
| | | | | | | | Task-number: QTBUG-25435 Change-Id: I13f57a328a7ac3402fe0def9d724f7e700016c80 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Map QAccessible::Role to the proper IA2Role.Jan-Arve Saether2012-04-261-1/+10
| | | | | | | | All enum values after the MSAA-specific roles needs a special mapping. Change-Id: I6c77abf09b68d2d3d772937be986d532db2e5292 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* MSAA bridge should not return any IA2-specific roles from get_accRole()Jan-Arve Saether2012-04-252-5/+8
| | | | | | | | Small cleanup/improvement. This patch just does what the removed ### says. Change-Id: I0d16541d2e4b8f948f32734ef0138fde5517932a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Make NVDA read aloud stuff from a Qt app again.Jan-Arve Saether2012-04-241-6/+7
| | | | | | | Previously, NVDA did not read aloud anything from a Qt app. Change-Id: Ie738e7e7d7acc54f45fab9195adc09bfde930174 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix a regression where events were not delivered on windowsJan-Arve Saether2012-04-242-7/+7
| | | | | | | Regression caused by a17907829e6b180f2bb4af9a8594996b2a0e531a Change-Id: I8a2ca35cf176b4db47f29d848cbc2cd8180596d0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Windows: Fix for frameless widgets.Friedemann Kleint2012-04-241-2/+2
| | | | | | | | | Let Qt::FramelessWindowHint take precedence over Qt::WindowTitleHint (which enforces WS_CAPTION and thus WS_DLGFRAME). Change-Id: I2c0248d8a3ee3ed0f04b926acdef3cbeb98ca571 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Change Windows font database to use qendian.hMiikka Heikkinen2012-04-241-111/+85
| | | | | | | | Removed the custom BigEndian class and utilized qendian.h functions instead. Change-Id: Ieb10f77411404e1524fcedaceffa5b0e333c7429 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows: Fix QRawFont loading from data.Miikka Heikkinen2012-04-235-5/+653
| | | | | | | | | | | | | The implementation for loading QRawFont from data was missing from Windows QPA plugin. For freetype font database, just called the parent QBasicFontDatabse implementation. For native font database, ported the implementation from Qt 4.8 qrawfont_win.cpp. Task-number: QTBUG-24197 Change-Id: Ia784d4cbc4f37c925aa49e53d04faf06a7169a73 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Windows: Remove fontengine autodetection logicMiikka Heikkinen2012-04-202-8/+3
| | | | | | | | Always default to native font engine as native fonts now work in QML applications, too. Change-Id: Iafa5f6d25a9a3b22f49763f287e4e358216cfc2d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix missing Windows native fonts in QML applicationsMiikka Heikkinen2012-04-201-0/+3
| | | | | | | | | | | Windows native fonts were not getting rendered because the font engine was cloned incorrectly for QRawFont, resulting in multi-engine instead of the specific cloned engine. Task-number: QTBUG-25410 Change-Id: I08f543e541739ac1b51f96f381ae1bb20b59399a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix compilation with QT_NO_DEBUG_OUTPUT definedAndy Shaw2012-04-206-1/+13
| | | | | Change-Id: If96e93c08240e0f626f8e465993b2c38b2cad832 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qwindowsintegration: fix build with -no-accessibility config option setKonstantin Ritt2012-04-194-1/+16
| | | | | | Change-Id: I2f4080b04f61ec425d41180f0163cebcc745c1b9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-04-173-5/+5
|\ | | | | | | Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
| * Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-1614-93/+267
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/corelib/io/qurl.cpp src/gui/kernel/qwindow.cpp src/tools/moc/generator.cpp src/widgets/kernel/qwidget_qpa.cpp src/widgets/styles/qstyle.h src/widgets/widgets/qtabbar.cpp tests/auto/corelib/codecs/utf8/tst_utf8.cpp Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
| * | Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.Robin Burchell2012-04-112-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these functions just to avoid an include, except to pay for it with worse runtime performance. On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15% faster(!) than adding an additional call to qMemSet. The advantage on sizes above that is unmeasurable. For qMemCopy, the benefits are a little more modest: 16-7%. Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-109-58/+248
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
| * \ \ Merge master into api_changesKent Hansen2012-03-276-97/+193
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qisenum.h src/dbus/qdbusconnection_p.h src/widgets/kernel/qwidget.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d
| * \ \ \ Merge master into api_changesKent Hansen2012-03-231-2/+2
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1
| * | | | | Got rid of Map / Unmap events in favor of Expose event.Samuel Rødal2012-03-221-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since change 2e4d8f67a871f2033 the need for Map and Unmap events has gone away, as now the Expose event is used to notify the application about when it can start rendering. The Map and Unmap events weren't really used except by QWidget to set the WA_Mapped flag, which we now set based on the expose / unexpose. Also guarantee that a Resize event is always sent before the first Expose, by re-introducing an asynchronous expose event handler. Since an expose is required before rendering to a QWindow, show a warning if QOpenGLContext::swapBuffers() or QBackingStore::flush() if called on a window that has not received its first expose. Change-Id: Ia6b609aa275d5b463b5011a96f2fd9bbe52e9bc4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | | | | Initialize reference count for QWindowsMsaaAccessibleJian Liang2012-04-161-0/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initaliize reference count value to 0 for QWindowsMsaaAccessible. Change-Id: I15cadd7ced0240322240060f6dd5126cc8add338 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | | | Windows: Determine suitable font engine from application.Friedemann Kleint2012-04-131-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Freetype engine currently works better for QML2, whereas the native engine is better suited to the widgets. Task-number: QTBUG-24205 Change-Id: I76de98c3e7c84a2d72542ea9860b8be1e67f7e04 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* | | | | Minor cleanup of the header file.Jan-Arve Saether2012-04-132-70/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move inline implementations to iaccessible2.cpp. Makes it easier to read and navigate the source code. Change-Id: I8da44ba0d40395356f612ff6b3ce2a808105838a Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | | | | Windows QPA plugin: Fix logging.Friedemann Kleint2012-04-133-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove frequently occurring messages. - Rename variable to QT_QPA_VERBOSE. Change-Id: Id930e1422675355a9657edae6505be87aaec98a5 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | | | replace hardcoded values with a surrogate handling methodsKonstantin Ritt2012-04-132-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib41e08d835f2e8ca2e32b4025c6f5a99840f2e27 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | | | | Implement modality in the Windows plugin.Friedemann Kleint2012-04-133-1/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable blocked windows and flash the active window if a blocked one is activated (as in Qt 4). Change-Id: I6b6d230f94a271ce2aa649e3f4e13ebd63e93da4 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* | | | | Add missing virtual destructor.Jan-Arve Saether2012-04-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I94ac82ad4771b2b4c36ac24cc412fa43a0d77afb Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | | | | fix mingw detectionMark Brand2012-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7eb78ebd79bfc1be36cc43a1f41f4e574b063aed Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | | | Make it possible to enable non-scalable font scalingMiikka Heikkinen2012-04-102-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows native font engine supports scaling of non-scalalble fonts, so make it possible to do so. Added two functions to QPlatformFontDatabase: fontsAlwaysScalable() and standardSizes(), and made fontsAlwaysScalable() to return true for Windows native font database. Windows Freetype font engine doesn't seem to support scaling of non-scalable fonts, so didn't enable it in there. Added implementation of standardSizes() for Mac OS. Task-number: QTBUG-24970 Change-Id: I41c9356ede8a37b7c61db94340dbeb5b629f34b9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* | | | | Don't hardcode the default families in qfont_qpa.cppPierre Rossi2012-04-102-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since different platforms come with different fonts, we should probably leave it up to the platform to decide which family to use. Change-Id: I18bb81c0ce87cc7e9ac7f3abaeae1b41c0ce8410 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* | | | | Fix compilation with MinGW-W64.Debao Zhang2012-04-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These types and values and been defined propsys.h from MinGW-W64 Version2 on. Change-Id: If74b7cf07a0fce414009c86519494a782508d8fe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | | | Windows: Send empty region in expose event from setVisible(false).Friedemann Kleint2012-04-051-1/+3
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing a crash in tst_qwidget.cpp, trying to redraw on destroying the platform window. Change-Id: I6b6e9a063a1c72dff8110c379f8392605aadbdd6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | | Windows: Use native font engine by default.Friedemann Kleint2012-04-051-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turn around the meaning of the command line parameter. The FreeType engine can now be activated by passing freetype. Change-Id: I9da6cd4a127603f9cfb91f0ce8450088c0883faa Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | | Windows: Fix menu color for Windows, WindowsXP.Friedemann Kleint2012-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Typo in palette. Change-Id: I8b4c23ef7f75ff3aa3351f15e4af0767a3ccd083 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | | WindowsXP: Fix Item view alternate color being black.Friedemann Kleint2012-04-031-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The theme palette needs to be initialized by the standard palette. Change-Id: I91c2ac9aea122e6ed9c09c96b35dfe0ef18a3ca0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | | Windows: Improve Freetype font database registry check for fontsMiikka Heikkinen2012-04-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some non-scalable fonts like "Courier" list some numbers after the font name in Windows registry, e.g. "Courier 10,12,15". These are not part of the font name and therefore confused the algorithm looking for font files. Improved the algorithm to ignore this kind of number list. Single numbers are still expected to be part of the font name. Task-number: QTBUG-24970 Change-Id: I3fe45b798f44bee962e5b3aa748fc4717f723353 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* | | | Adapt windows input context to QGuiApplication::focusObject()Pekka Vuorela2012-04-021-6/+6
| | | | | | | | | | | | | | | | | | | | Change-Id: I8c18814d705b456d3285d7a5f2e1e0849af99b70 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | | Implement application font loading for WindowsMiikka Heikkinen2012-03-274-28/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For FreeType Windows font database, use the application font loading implementation of the parent class. For native Windows font database, the implementation was adapted from Qt 4.8. Also fixed a bug in font database population, where old data was not destroyed before population, resulting in fonts not getting properly repopulated when a new font was added. Task-number: QTBUG-24193 Task-number: QTBUG-24195 Task-number: QTBUG-24196 Change-Id: Ie224a87baf7500b9867aaafa807f62dd4503dee8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | | Introduce FontSmoothingGamma as a platform style hint.Friedemann Kleint2012-03-273-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Allocate gamma tables on the heap in a thread-safe way, use font smoothing returned by the style hints of the platform to calculate them. - Improve font rendering on Windows. Change-Id: I8cd39b51cf03cbd642474c02b9076814baecd597 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | | Fix IAccessible2 for Windows, enable MSAA/IAccessible for MinGW.Jan-Arve Saether2012-03-272-5/+3
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 5e9089135bfe7db7d7a43c9ee4d4c24ab8f6458d had some problems: * It left out the cast to IServiceProvider in the refactoring of QueryInterface. This broke IAccessible2. * It also failed to enable the codepath for MinGW inside wrap(), which effectively caused MSAA for MinGW to be disabled. It also adds an autotest to the bridge (finally). It is simple, but it should help avoiding committing stuff that completely breaks the bridge. Change-Id: I459d89c3bdb93e54ddea85872b50fc1dba0fe4a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | Enable IAccessible for MinGW32, keep IAccessible2 disabled for MinGWJan-Arve Saether2012-03-246-93/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No surprise, the files generated by midl contains code that only the MS compiler will understand. However, since the generated files are only needed for IA2, we can still compile the old IAccessible/MSAA implementation for mingw (like it was before the introduction of IA2) I used mingw 4.6.1 to test this. Change-Id: Iad581f2fee087bd7b796ac5a01548f2fcacbd595 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | API cleanup: remove CoordinateType enumJan-Arve Saether2012-03-242-4/+39
| |/ |/| | | | | | | | | | | | | The bridge can do the mapping to and from screen position. This is now done in the windows bridge. Change-Id: I5ca5df0fbeeb58202539f55a0f62717fb1685092 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* | Fix QSysInfo::WindowsVersion checking (QSysInfo::WV_NT_based is a mask)Joerg Bornemann2012-03-221-2/+2
|/ | | | | | | | Manual merge of the original fix 1ef309e9 in the Qt 4.8 repo. Task-number: QTBUG-20480 Change-Id: Id08500c2dd16965af3942e65cff1f4afa24180b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Refactor theme plugin loading.Friedemann Kleint2012-03-155-11/+22
| | | | | | | | | | | | | | | | | | | | In the old implementation, the QPlatformIntegration was asked for the theme first, so there was no way of overriding that by a custom plugin. Also, there was a memory leak in case the platform theme was actually created by a plugin. QGuiApplication now asks the QPlatformIntegration for a list of potential theme names first, tries to load them using the plugin loader and finally invokes a factory method of QPlatformIntegration in case that fails. The theme is now owned by QGuiApplication. In the XCB plugin, the environment variable DESKTOP_SESSION is queried and appended to the list of themes, making it possible to load plugins for other session types. Change-Id: I1a4b4e061815bca16c65b23e591bb7563a3e44e2 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>