summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make it possible to use QPointer<const T>Stephen Kelly2013-02-134-35/+33
| | | | | | | | | | | | | This is possible with QWeakPointer, so allow it for migrating code too. In the process, replace the QPointerBase with a member variable for simplicity. The functionality of the QPointerBase is replaced by a TypeSelector template. Change-Id: I3b4c77bdeda2b863cc33e84a3da8a25bae928c8c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix undefined reference to XSetTransientForHint.Jonas Gastal2013-02-131-0/+1
| | | | | Change-Id: If137fbfd566fdd2950f012013031d74e84b16d00 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix build with old MinGWFrederik Gladhorn2013-02-131-0/+4
| | | | | Change-Id: I9d7c40c146bb3d14cd1dccab10a70b28722c7c27 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QMetaMethod is needed in qtreeview.cpp even without accessibility.Samuel Rødal2013-02-131-1/+1
| | | | | | | Change-Id: I195c4d591a1908e17ad45338d6b9a19b8948b804 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Add support for color glyphs (Emoji) on Mac OS X and iOSTor Arne Vestbø2013-02-1310-55/+133
| | | | | | | | | | | | | A new glyph type is added to the glyph caches for ARGB bitmap glyphs, and the raster and OpenGL paint engines have been modified to support this glyph type for drawCachedGlyphs(). The CoreText font engine implements support for these glyphs through the CTFontDrawGlyphs API, since CGContextShowGlyphsWithAdvances does not handle color glyphs. Change-Id: Idad9ce75a911cae130d65aebe59142772a16fc12 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* replay mouse press event after a popup widget has been closedJian Liang2013-02-121-0/+15
| | | | | | | | | | | | | | If a popup widget(e.g. a popup menu) has been closed due to a mouse press event, the mouse press event will be consumed by the popup widget and the widget under the mouse pointer can't receive the event. This will lead to confusing behavior such as a push button under the mouse pointer is not been push down. This patch replay the mouse press event if a popup widget has been closed. Change-Id: Id493583dfea9e64ab2964e28d559122c43bbc2a6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Mark public non-member non-static variables as Q_DECL_UNUSEDThiago Macieira2013-02-122-2/+3
| | | | | | | | | | This avoids warnings in compilers that check for unused variables. They can't tell that the the variable came from a header. Change-Id: I1ea5e5bbc76d676fbb561bdc8ae6543e758de90e Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add Q_DECL_UNUSED to a function only used in Q_ASSERTThiago Macieira2013-02-121-1/+2
| | | | | | Change-Id: I18697037db742d38874c8a95df12c189ccc51068 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Add Q_DECL_UNUSED, marking functions or variables unusedThiago Macieira2013-02-121-0/+4
| | | | | | | It's similar to Q_UNUSED, but this is to be added in the declaration Change-Id: I2f664129fb1f34f7913ef371d45c2c0fec958174 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improve QRegularExpression captureCount / namedCaptureGroups docsGiuseppe D'Angelo2013-02-121-4/+23
| | | | | | | | | | | We need to clarify what's the status of the implicit capturing group #0 in both of this methods. The former doesn't include it, while the latter does for convenience/consistency in the way we count the capturing groups. (Note that this last behavior is actually autotested.) Change-Id: I2170842c2a6dffa34fa56389ceead61a92c07cd1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QRegularExpression: print a warning if (?J) is used in a patternGiuseppe D'Angelo2013-02-123-0/+42
| | | | | | | | | (?J) inside a pattern string can be used to allow or disallow duplicated capturing group names in the pattern string itself. Although PCRE supports duplicated names, in Qt we don't yet. Change-Id: I21cd0c41273cd7ef42870ced3a0fad6ba7035cbc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QRegularExpression: don't use study data when getting the pattern infoGiuseppe D'Angelo2013-02-121-1/+2
| | | | | | | | | | | | | | Information about the pattern (number of capturing groups, newline settings, etc.) are grabbed when the pattern is compiled the first time. Studying (=> optimizing) is always done later, after a certain amount of usages. In case this ever changes, add an assert. Besides, we're not grabbing any info that require studying the pattern first. Change-Id: Ica15fa21f7bf13213288d7090d3396a89900078e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix sizeHint for QAbstractSpinBoxCaroline Chao2013-02-127-35/+38
| | | | | | | | | | | | | | | | | | | The current size hint is not correct and the text is truncated when using prefix/suffix. Update QCommonStyle::sizeFromContents() to get the button and frame widths into account for the QSpinBox width. Update sizeFromContents() in the different styles to be consistent with the change in QCommonStyle. Update minimumSizeHint(), calculate it using the prefix and data range. The SpinBox can shrunk over the suffix if any. Task-number: QTBUG-28863 Change-Id: Ia742232edf8b11d0283e8136c2818928f8755103 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Leave some Qt 6 remarks for QStringRefThiago Macieira2013-02-121-0/+4
| | | | | | | | | | | | | | QStringRef could have been trivial. The destructor is empty, the copy constructor copies exactly the members and has an empty body and all the members are POD. Both functions should be removed or defaulted in Qt 6. When the destructor is defaulted, we can make the constructor constexpr. We can't do that now because QStringRef is exported and some nasty compilers (MSVC) like to export all functions, even inline ones, and then call them without emitting a local copy. Change-Id: Ie7509fd1a3f737a6c9156ea078d13bb347fc6be0 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Use CTFontCopyDefaultCascadeListForLanguages for font fallback if availableTor Arne Vestbø2013-02-122-68/+129
| | | | | | | | | | | On Mac OS 10.8 and iOS 6.0 we can use CTFontCopyDefaultCascadeListForLanguages to get the list of fallback fonts, which is preferable to reading the plist file from the filesystem. The latter doesn't work (is not allowed) on iOS in any case, so for iOS < 6.0 we use a static list of fallback fonts. Change-Id: Ibb5e1b4dedd6bfb936f66b53a20f7ced83536ed7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Don't use the fallback list to decide if the CoreText font db was populatedTor Arne Vestbø2013-02-121-1/+5
| | | | | | | | | | | | In some situation (such as iOS currently) we may end up with an empty fallback list, and we don't want to re-populate the font database on every call to fallbacksForFamily(). We do not guard populateFontDatabase(), since it's called both initially and every time the font database has been invalidated. Change-Id: Ief1342c40f75e5d393e054e9a20bc94bc357d482 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Added QWindow::Visibility convenience API to QWindow.Samuel Rødal2013-02-124-0/+179
| | | | | | | | | | | This finally makes it possible to make windows fullscreen etc from QML by doing "visibility: Window.FullScreen". I don't see any reason from not having the API at the QWindow-level instead of at the QQuickWindow-level since this way it can benefit other use cases too. Change-Id: If27344306eb563bc2ccd83296a46b1f2862e2db1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Enablers in fbconvenience for Android portEskil Abrahamsen Blomfeldt2013-02-124-11/+51
| | | | | | | | Additions to make the convenience classes work for the Qt for Android port. Change-Id: I25ba0faf93c7e09ab04a3fa0784e04631e5ab036 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Make QGraphicsViewPrivate::updateRubberBand more readableThorbjørn Lund Martsum2013-02-121-41/+36
| | | | | | | | | | | | | | This patch changes QGraphicsViewPrivate::updateRubberBand to return at once in case some of the first conditions (which were needed to do something with the rubberband) are not true. The indentation after these ifs is fixed, and there are a few style fixes, but beside the first 2 ifs, there are only white-space and new-line changes. Change-Id: I7e2edb7bfd334b35ee8ab246f733d854bff7e0f7 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Remove overlapping variable names defined in VxWorks headersPasi Petäjäjärvi2013-02-124-26/+0
| | | | | | | | | | VxWorks has defined variables with same name as in Qt's headers. Remove these undefines because that has already done in file src/corelib/kernel/qfunctions_vxworks.h. See related change f7bd8652caab2f53ced739ce90c640924d4962dc. Change-Id: I994ac9d00ca223b9fa955dfcba8ad6c8dcbd0549 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Use stub function rand_r for VxWorks DKM modePasi Petäjäjärvi2013-02-122-0/+4
| | | | | | | | Vxworks DKM mode does not have rand_r function, use function implementation from qfunctions_vxworks.h/cpp instead. Change-Id: I8f23c3453ab9f31280eb90f66dd83d7a64ee98c9 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Document the QPainter::HighQualityAntialiasing render hint as obsolete.Samuel Rødal2013-02-121-6/+2
| | | | | | | It was only used in the now removed OpenGL 1.x paint engine. Change-Id: I2237172de700bfd31ca25279fbed21d601785962 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Ensure QDateTime can handle QDate's full range of julian dates.Mitch Curtis2013-02-123-7/+54
| | | | | | | | Currently, using QDate::maxJd() in tests will fail. This patch changes some ints to qint64s to prevent overflows where necessary. Change-Id: I61ebf8f233411a7544689fd5bfa9c3abee54e933 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Correctly detect HTML 5 charset attribute in QTextCodec::codecForHtml()Mitch Curtis2013-02-122-23/+84
| | | | | | | | | | | | | | | | | | | | | | | | | QTextCodec::codecForHtml currently fails to detect the charset for this HTML: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=9,chrome=1"> <title>Test</title> </head> This patch makes the detection of charsets more flexible, allowing for the use of the HTML 5 charset attribute as well more terminator characters ("'", and ">"). I also added a *_data function for the unit tests. Task-number: QTBUG-5451 Change-Id: I69fe4a04582f0d845cbbe9140a86a950fb7dc861 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
* Simplify a function to fix a warning reported by ICCThiago Macieira2013-02-111-5/+2
| | | | | | | | | | | | ICC thinks that the return statement is missing: src/plugins/accessible/widgets/itemviews.cpp(867): error #1011: missing return statement at end of non-void function "QAccessibleTableHeaderCell::parent" Clearly it's wrong, but the function is overly complex for no good reason. So just simplify it instead. Change-Id: Ic63029df18b4712d9864a4dc66b6751b2d4574b7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Add Q_DECL_RESTRICT and Q_ALWAYS_INLINE for MSVCThiago Macieira2013-02-111-0/+4
| | | | | Change-Id: I598463e5990e91a5a049d1f9f7a4aa80930c0904 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Rename the Q_STATIC_INLINE_FUNCTION macro to Q_ALWAYS_INLINEThiago Macieira2013-02-111-14/+14
| | | | | | | | | That's what the macro did anyway, except it had an extra "static" keyword. This allows us now to use Q_ALWAYS_INLINE in non-static contexts, if we wanted to (e.g., certain template cases). Change-Id: I899d359f46234e93d1912ef9125080dc84e15c93 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* BB10 systemProxyForQuery: query system proxy also for non-URL requestsPeter Hartmann2013-02-112-4/+28
| | | | | | | | | | | | | | ... like e.g. in QAbstractSocket::connectToHost(). We can set the scheme on the query URL based on well-known ports; even if the port is not well-known, we can just query the URL anyhow and let the netstatus API resolve the right proxy for us. In addition, return early for local schemes like "file" and "qrc". Task-number: QTBUG-29425 Change-Id: I900f1ecbac6dd380bb8a77470b39de2c07aa7f6e Reviewed-by: Andrey Leonov <aleonov@rim.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* QPA Cocoa Menu: Make sure mouse button state is clean after popupGabriel de Dietrich2013-02-113-12/+12
| | | | | | | | | | | Calling popUpMenuPositioningItem:atLocation:inView: will swallow any mouse up/released event, if we popup on mouse down/pressed. Since we cache the button state in QNSView, the safest way seems to be to clear this button state. Another option would be to send Cocoa mouse up events for each mouse button, but we prefer to keep things simple. Change-Id: I7f3f369c45e9f5ed9d2ab693bffd8be4a4596ae6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Allow QtTest's QCOMPARE to work with mixed q(u)int32 and q(u)int64Jon Severinsson2013-02-112-0/+66
| | | | | | | | | | Change-Id: I491edcae84c149775cf3640626ccff8cbf0d69fe Reviewed-by: Jon Severinsson <jon@severinsson.net> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jason McDonald <macadder1@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Remove dead code from QPointer.Stephen Kelly2013-02-111-40/+0
| | | | | | | | | | | The compilers checked here are not supported in Qt 5. Additionally, the QSharedPointer implementation has similar operators without such guards, so in reality these compilers may not have worked with Qt 4.6+ either. Change-Id: I208f3cde7c689770ae15245a555e3a58b749a8a3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add support for getting the paper names available for the printerAndy Shaw2013-02-1115-3/+131
| | | | | | | Task-number: QTBUG-27714 Change-Id: I9bc6f1188f262e43f581add058d7895e1b5bd9e3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Also copy checkable property to platform itemBogDan Vatra2013-02-111-1/+2
| | | | | | | Add missing property copy statement. Change-Id: Ic7cae46becd412194a490d0fe501ce6ebe2737a3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Automatically hide the SIPBogDan Vatra2013-02-112-1/+5
| | | | | | Change-Id: I4d63a883941842aed9a9c3806479d7aeeebb9f56 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Remove unused variableMontel Laurent2013-02-111-1/+0
| | | | | Change-Id: I3cef189a668f73c8599958b2c15bf140bd86d091 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix initialize variablesMontel Laurent2013-02-111-0/+2
| | | | | Change-Id: Iaebd03bebf38cddf84f163703e2820925b69c3d9 Reviewed-by: David Faure (KDE) <faure@kde.org>
* Fix missing namespace macro warnings when building Qt Addon modules.Aaron McCarthy2013-02-111-3/+5
| | | | | | | | | | | | Addon modules may not be in the standard Qt namespace and therefore do not use the QT_{BEGIN,END}_NAMESPACE macros. Instead module specific QT_{BEGIN,END}_NAMESPACE_FOO macros are used. Extend the syncqt test to allow for this and ensure that the QT_END_NAMESPACE suffix matches the QT_BEGIN_NAMESPACE suffix. Change-Id: I33110c01118b0fb4376307db7447f747fc38bb29 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qprocess autotests don't need QtGuiDavid Faure2013-02-097-0/+7
| | | | | | | | (this isn't true of -all- corelib/ autotests though, e.g. tst_qdatastream uses QBitmap) Change-Id: I314fda5d85d45cb5eece8da74156989b83cf0299 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix segfault when setting a device-pixel-ratio on a null-QPixmapTor Arne Vestbø2013-02-091-0/+3
| | | | | Change-Id: If3680766a50d5cf78889822d740c9472123191a7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* QGraphicsView - remove not needed storeMouseEventThorbjørn Lund Martsum2013-02-092-3/+2
| | | | | | | | | | | | | | | | updateRubberBand is only called from mouseMoveEvent. The event is not changed. At the end of the event we call d->mouseMoveEventHandler which calls storeMouseEvent. There is no need to call it twice. Beside that this patch also changes the argument from QMouseEvent* to const QMouseEvent*. The only reason it needed to be const was the call to storeMouseEvent. Change-Id: I01148a6a8d36e782c4d95a90e36435e20b1681e1 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Add support for SHA3 to QCryptographicHash.Richard Moore2013-02-0912-96/+270
| | | | | | | | | | | This commit adds SHA3 support to QCryptographicHash. Two implementations are provided, one optimised for 32 bit and one for 64 bits. The code has been written to make it easy to add further implementations, for example ones using NEON instructions on ARM. Change-Id: I3be9c45bbd4fcc2771d697e7f7ae74e48a831e8f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fixed QOpenGLFunctions feature/extension detection to check GL versionSamuel Rødal2013-02-091-2/+9
| | | | | | | | | | If the GL version is new enough the extension string won't contain features that have been standardized. So far we only check for FBOs. Change-Id: Ib29826f378b394894885717c062872581bd5c9f5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Try harder to locate external OpenSSL libraries on win32Erik van Pienbroek2013-02-091-7/+25
| | | | | | | | | | | | When OpenSSL is built using MSVC then the library names are named ssleay32.dll and libeay32. However, when OpenSSL is built with GCC then different library names are used like libssl-10.dll and libcrypto-10.dll (depending on the version of OpenSSL used) Change-Id: Icb79a5f82d2a511752bfc904f53a58423ce4b86b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Peter Hartmann <phartmann@rim.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* QUrl effective TLDs: update table and split into chunks of 64KPeter Hartmann2013-02-095-6209/+9718
| | | | | | | | | | | The table is there to know which domains are allowed to set cookies and which are not. There are more than 2000 new entries since the list has last been generated. The split to 64K chunks was made because this is the hard limit for strings in Visual Studio. Change-Id: I511aec062af673555e9a69442c055f75bdcd1606 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* SSL: Use correct signature for SSL_get1_sessionMarcel Krems2013-02-092-2/+2
| | | | | | | | | | | This fixes a compilation error with GCC 4.7 which was introduced in b5652df775efbd1c52eecee5f08e40e600e5d70b In function ‘SSL_SESSION* q_SSL_get1_session(const SSL*)’: invalid conversion from ‘const SSL* {aka const ssl_st*}’ to ‘SSL* {aka ssl_st*}’ [-fpermissive] Change-Id: I909f7fb4295b2019283a7af66a038d4711e5f7cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Add QWindowSystemInterface::handleFileOpen(const QUrl&)José Dapena Paz2013-02-084-4/+14
| | | | | | | | | | | | In some cases, the call to handleFileOpen may receive a non local URL. With previous API, there was no way to pass it to other layers. With this change, any platform plugin creating this event can directly pass a URL. Change-Id: Ibd7299ad6c09527e1db979840bd67726882efb9b Reviewed-by: Jose Dapena Paz <jdapena@igalia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Added version() and setVersion() convenience API to QSurfaceFormat.Samuel Rødal2013-02-085-0/+139
| | | | | | | | | | This lets you write code like format.version() >= qMakePair(3, 2), and format.setVersion(4, 2) instead of format.setMajorVersion(4); format.setMinorVersion(2); Change-Id: Ib052091cc12865ea0d5db52e468ed6cd28f14840 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Allow actions in a QMenu to show their tooltipshjk2013-02-083-1/+47
| | | | | | | | | | | This introduces a property QMenu::toolTipsVisible with default value set to 'false'. Task-number: QTBUG-13663 Task-number: QTBUG-2362 Change-Id: I13079609e2a92adc71b2bbff3dd94494cde1f586 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* qMetaTypeId(): deprecate the dummy parameter.Olivier Goffart2013-02-083-19/+19
| | | | | | | | | | | | | | It was there because of MSVC6 compatibility. It is not removed, because some code used to do qMetaTypeId(&myVariable); This was not a documented feature anyway, so it should not be user visible. Change-Id: I55327d7e73e67a6bb741817741d530d5a650291a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix crash-on-exit with some plugin systems (e.g. sensors)Thiago Macieira2013-02-071-8/+9
| | | | | | | | | | | | | | | | | | | | | | | Don't assume that all entries in the QLibrary global data refer to libraries have have been loaded. There are three (not two) ways of getting entries there: 1) creating a QLibrary 2) using the static QLibrary::resolve 3) via plugins The unload code was meant to handle the first two cases only: libraries are still loaded at the end of the execution if the static methods were called or if QLibrary objects were leaked. It didn't handle the case of plugins being found by the directory scanner in QFactoryLoader but never loaded. Note it's possible that this assertion also happened with leaked QLibrary. Change-Id: Idcd7a551f96d8fe500cbca682f8014f5122b7584 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>