summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin
Commit message (Collapse)AuthorAgeFilesLines
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-295-20/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-2318-18/+18
|\ | | | | | | refs/staging/dev
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-1818-18/+18
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Do not define QT_NO_DYNAMIC_LIBRARY for VxWorks process (RTP)Pasi Petäjäjärvi2013-01-231-1/+1
|/ | | | | | | | Shared libraries cannot be used in kernel mode (DKM), only at process mode (RTP). Change-Id: I8cecc12461aa4417b16577db3bc9cd85a1aa7efa Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix warning about cast from ASCII.Friedemann Kleint2013-01-071-1/+1
| | | | | Change-Id: I5434ece3b1bd0c56ca4481a68dd67e914715bc28 Reviewed-by: David Faure (KDE) <faure@kde.org>
* Improve Cocoa platform plugin loading.Morten Johan Sorvig2012-12-122-1/+22
| | | | | | | | | | | | | | | | | | | Loading both the debug and release version of the cocoa plugins causes the objective-c runtime to print "duplicate class definitions" warnings. Fix this by directing the plugin loader to only load one of the cocoa plugins if both are available. Implement this as a special case directly in QFactoryLoader. Define QT_NO_DEBUG_PLUGIN_CHECK to allow mixing debug and release builds. Task-number: QTBUG-28155 Change-Id: Ie1927b219cc501a821f91b7e4b56f0589e0acbf5 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove QUUID_STRING from qfeatures.{h,txt}Tasuku Suzuki2012-12-052-16/+1
| | | | | | | It is too specific and relatively small Change-Id: I55ec15ecaac0692741996a5c15a111db696490cf Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* QPluginLoader: fix loading of plugins with a relative file nameDavid Faure2012-12-044-49/+118
| | | | | | | | | | | This makes QT_PLUGIN_PATH / QCoreApplication::libraryPaths() actually work, as a search path for plugins, when apps look for a specific plugin by name. To make it possible to write portable code (unlike the current QPluginLoader unittest), let QPluginLoader figure out the extension, too. Change-Id: I895d597d7cb05ded268734bc5f313f32d8d12cb9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Review of documentation.Michele Caini2012-10-191-3/+27
| | | | | | | Documentation has been updated to reflect changes in Qt5. Change-Id: I378858cf61f4bf62375c30c3903818d754dadcf0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2218-422/+422
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Mark (non-public API's) ctor's as explicitSergio Ahumada2012-09-141-1/+1
| | | | | | | | | Make C++ class constructors that can be used with only one required argument 'explicit' to minimize wrong use of the class. Change-Id: I12ad5b6eb1794108c6b7464a2573e84068733b03 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Removing duplicate includesSergio Ahumada2012-09-091-1/+0
| | | | | | | Do not include a header more than once Change-Id: Ia2e5d66e72988ad833cf5177a3f8aa988bf510e9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix static plugins for classes in namespaces.Friedemann Kleint2012-08-301-6/+6
| | | | | | | | | | | Breakage introduced by 819d0203e6fd9d27dc4c22e8c3cb8b437998f62a . Extend QT_MOC_EXPORT to take the unqualified class name as well for the function names. Change-Id: I736097b564caa37c522d723780663d03341f9032 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Lukas Geyer <lgeyer@gmx.at>
* Plugin metadata is now updated in setFileName(), not load().Lukas Geyer2012-08-293-6/+16
| | | | | | | | | | | | Plugin metadata has been updated in load(), with the side-effect of metadata not beeing available until plugin has been loaded - and which the new metadata system tries to prevent in the first place. The metadata is now updated (and avaiable) as soon as a valid filename is set. Change-Id: Ia5aedc67d8115e71c2ecbcbcadf786ba1c2893d8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix plugin docs regarding location of json files.Stephen Kelly2012-08-271-1/+2
| | | | | | | | | The commit 2ef52ca12416baa96feb64e02186aae04f883a12 introduced an error regarding where the json file must reside. Change-Id: I296c93abebb3e9f8c9e7e29a4a433201064969f0 Reviewed-by: Peter Kümmel <syntheticpp@gmx.net> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update Q_PLUGIN_METADATA docu.Peter Kümmel2012-08-261-1/+6
| | | | | Change-Id: I7e451a15de392552609ef549118600684429e0ea Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-234-0/+4
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Add Q_DECL_NOTHROW to some qHash functionsThiago Macieira2012-08-202-2/+2
| | | | | | | | | | | | The hashing functions for QDateTime and QHostAddress did not get the noexcept keyword because they might allocate memory. QDateTime doesn't do it now, but it could in the future. QHostAddress does allocate memory today. Change-Id: Ia5f80942944bfc2b8c405306c467bfd88ef0e48c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix more qdoc errorsLars Knoll2012-08-201-5/+7
| | | | | Change-Id: Ieed340068327f37ea0f549d24ea49235994118f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix reloading of pluginsLars Knoll2012-08-011-0/+1
| | | | | | | | | Unloading and reloading a plugin didn't work correctly, because we didn't reset instance to 0 on unload. Task-number: QTBUG-26098 Change-Id: Ic3e4497f359b1ca455be949dce9cafa9d67d8039 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* More qHash(T, uint) supportGiuseppe D'Angelo2012-07-232-7/+10
| | | | | | | | Add the seed to QPair, QUuid, QPersistentModelIndex's qHash(), and fix qHash documentation for them and for many other datatypes. Change-Id: I1386f3ed42ee1a832371a242ee5c82895ba92c2b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improve the loading performance of QLibrarySean Harmer2012-07-233-33/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If an absolute path is specified we try that first. Otherwise we first try the most likely system-specific format (e.g. libfoo.so) on Unix. This improves performance especially on systems with slow flash devices. For example, prior to this commit loading the Xcursor library (in the xcb plugin) results in attempts to dlopen: "Xcursor" "Xcursor.so.1" "libXcursor" "libXcursor.so.1" With this commit this is reduced to a single attempt of: "libXcursor.so.1" Plugin loading uses absolute paths with QLibrary so there is no performance penalty for plugins with this commit. This is however a behavioural change with respect to Qt4 but one that I believe is justified and wanted. Change-Id: I7813afa335f9bf515e87934c2f8f97888818c69c Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Improve performance of QLibrary::load()Sean Harmer2012-07-211-4/+4
| | | | | | | | | | | | | | | There is no need to create a QFileInfo object to split the path and filename. Change-Id: I54ebb4b62ebdd93a257bce0b337ac0012f0d5a56 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix static plugin loading.Thiago Macieira2012-07-121-4/+11
| | | | | | | | | | | | The QFactoryLoader::indexOf and keyMap functions expect to receive the metadata that contains a "MetaData" entry, instead of the entry itself. Also, QFactoryLoader::metaData() skips static plugins with the wrong IID, so we need to skip it too in QFactoryLoader::instance(). Change-Id: I8a453087feb88d0e8d1021054353f3600d5100a5 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix some spelling errorsSergio Ahumada2012-07-111-1/+1
| | | | | | Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Document that the object of a plugin must be default-constructible.Stephen Kelly2012-06-271-0/+2
| | | | | Change-Id: Iaaf56ec3bb0d2423c8ab5deb0627dc1357cee830 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make QUuid compile with QT_NO_QUUID_STRING without breaking QDebug <<Jeremy Katz2012-06-201-1/+6
| | | | | | | | | | | | | | Change I0cbb0581a1c3abefdde75b7cd45fdafd31640f0d breaks the use of operator<< for QDebug, which shows up when trying to link QtCore in the small qconfig. Instead, render QUuid as "QUuid(QT_NO_QUUID_STRING)". Task-number: QTBUG-24816 Change-Id: Ia52283d7461a9907bcec7a110e41c9f830895efe Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Make QUuid compile with QT_NO_QUUID_STRINGJeremy Katz2012-06-181-1/+1
| | | | | | | Task-number: QTBUG-24816 Change-Id: I0cbb0581a1c3abefdde75b7cd45fdafd31640f0d Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Make sure you can link against more than one static pluginLars Knoll2012-06-121-3/+3
| | | | | | | | The old macro was leading to symbol clashes. Change-Id: I090c511d4090bc96fc6c88537fae7bbe7f143b6c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Remove support for Qt 4 style pluginsLars Knoll2012-06-067-374/+26
| | | | | | | | | | The new plugin format allows us to avoid loading the plugins in all cases. Remove the old format, as we could get bad behavior with the old format if Qt would try to dlopen a Qt 4.x plugin. Change-Id: I2193e6874d6cca3c0b12298c2b9beb4105a42fd5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update of the plugin documentationLars Knoll2012-06-061-26/+11
| | | | | | | | Moved the plugin overview from qtdoc to qtbase. Updated the docs to describe the new plugin mechanism. Change-Id: I1b92d5099aeaa3a166c1f7698176d811d47c3392 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QPointer instead of QWeakPointer.Stephen Kelly2012-06-051-1/+1
| | | | | | | | The use of QWeakPointer for tracking QObject pointers is to be deprecated. Change-Id: If460ca7f515db77af24030152f4bd56e1a5fae7c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Expose the plugins meta data in the plugin loaderLars Knoll2012-06-052-0/+19
| | | | | | | | | add a metaData() method to QPluginLoader so that applications can query the plugins meta data without having to load the plugin. Change-Id: Ic3ebb35fd3c403926326e8dd1de4176b0c48dbef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Populate MetaData:Keys for compat pluginsKent Hansen2012-05-241-1/+5
| | | | | | | | | | QFactoryLoader::indexOf() expects the meta-data to contain a Keys entry, if there were any keys. For compat plugins, the result of the plugin's keys() function should be stored here. Change-Id: Ifd04f90cbfce2598d71548c469baa55ca6b0b338 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QElfParser: double check section size before using it.Arvid E. Picciani2012-05-161-1/+1
| | | | | | | | | In rare cases, if the section is empty, we're reading the whole object into memory because size -1 = UINT_MAX. Change-Id: Ibf9a1534159ce626e4f2327536076d0cc1ebf0ba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QElfParser: fix type of sh_sizePino Toscano2012-05-152-3/+3
| | | | | | | | | The type of the sh_size field of a section header is either Elf32_Word or Elf64_Xword, so the type used cannot be qelfword_t (always 32 bits) but qelfoff_t. Change-Id: Ia380b6823913fee7a96b39f742630ae3a9ca0cb8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Arvid Picciani <arvid.picciani@nokia.com>
* Use org.qt-project for the QFactoryInterface's IIDThiago Macieira2012-05-151-1/+1
| | | | | | | Task-number: QTBUG-23273 Change-Id: I935d2e20a4905121ca226f052528fa7c9d80e88b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add private API for finding symbols on LinuxGlenn Watson2012-05-151-0/+7
| | | | | | | | | | | | Add an API for use by declarative that allows searching for a symbol that has been loaded, without opening a specific library. This makes it possible for declarative to determine if the profiling library has been preloaded, and to call functions on it that enable / disable / save the current profile. Change-Id: I2ec12d9babea2a152990c19735e98d4d7c10a062 Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QFactoryLoader: Add API for supporting the metadata containing keys.Friedemann Kleint2012-05-072-0/+65
| | | | | | | | | | | - Add a method returning a QMultiMap<int index, QString key> to QFactoryLoader, determined from metadata(), correctly reflecting the data structure ('Keys' being a list) - Add convenience templates to create plugins via factory interfaces Change-Id: I247749aa3245f635e476605db1c4cd9c74b74dea Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Place the plugin metadata into special sections for Mac and WinLars Knoll2012-05-051-3/+15
| | | | | | | | | | | | | | | | | | The plugin metadata is placed into a special section in the object file on ELF systems to allow finding it fast. Place the data into a special section on Mac and Windows as well, even though we don't have Mach-O or COFF parsers available yet. This will allow us to add the Mach-O and COFF parsers as a pure optimization later on. Task-number: QTBUG-25054 Change-Id: I376d5443ede715aee2c68fb62d24afdbf66e5685 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtCore]Thiago Macieira2012-05-042-2/+2
| | | | | | | | | | | 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: I38f97ad379deafebef02c75d611343ca15640c8a Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Fix compilation of public headers with QT_NO_DEPRECATED definedOlivier Goffart2012-05-021-1/+1
| | | | | | | | | | Put the functions in QT_DEPRECATED_SINCE if possible QPluginLoader::staticInstances is not documented as deprecated, and do not reference any alternative use. So I unmarked it as deprecated. Change-Id: I556c3f3657fb0490dd5543fcc56718fe9bd394e7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Allow loading of static plugins by indexLars Knoll2012-05-011-10/+19
| | | | | | | | | | Static plugins could so far not get loaded by index. Implement the missing support for this. Task-number: QTBUG-25274 Change-Id: I901b08bfaf4f9fc3cb9fcea0b47f3ed89588a27b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Provide access to RTLD_NODELETE flag on Unix.Yan Shapochnik2012-04-243-1/+20
| | | | | | | | | Introduce a new QLibrary::PreventUnloadHint to support the RTLD_NODELETE flag support by dlcompat on Unix platforms. Change-Id: Ib1327e968a2a888850ad1086a102a143f86c5090 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
* Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-193-13/+13
| | | | | | | | | | | | This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-102-1/+18
|\ | | | | | | | | | | | | | | | | | | 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
| * Fix a crash in QFactoryLoaderJonas Rabbe2012-03-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The change in plugin loading has meant that different plugins in the same plugin folder will not be handled properly when loaded with different instances of QFactoryLoader. A solution is to only unload compatability plugins from QFactoryLoader::update() since they are the only plugins that are actually loaded in that method. This auto test shows the error on the current version of QFactoryLoader and passes with the fix described above. Change-Id: I12001525d51bb631d6742c5965357598322f247c Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * QUuid: mark constructors constexprMarc Mutz2012-03-271-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See e.g. f3141c58badbd2da9eb42 for rationale. The problematic part here is the array member which in C++98 cannot be initialised in the ctor-initializer-list. For this, C++11 Uniform Initialisation is needed, for which Qt does not yet have a Q_COMPILER_* macro. I'm not sure we need one, either, since I doubt that there's a compiler that implements std::initializer_list, but not uniform initialisation. Change-Id: I4fa8f4f9db8703096358634fb2e6f5de61f0fedd Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QUuid: mark as Q_PRIMITIVE_TYPEMarc Mutz2012-04-021-1/+1
|/ | | | | | | | | | | | | | Commit 01674860ac85a42eb152092c6e99f7ad03346977 marked QUuid as Q_MOVABLE_TYPE, but it's even primitive: Every bit pattern represents a valid QUuid object (if not a valid UUID), and memcpy() can be used to obtain a valid, independent copy of the object. It might not be a POD, but its close enough. Change-Id: I0fd2d11472590688a91e9ee424732e4d5ba15df8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Don't reject plugins that have empty meta-dataLincoln Ramsay2012-03-171-2/+1
| | | | | | | | | Having an empty Json object ({}) should be valid meta-data but this check means that there needs to be at least one key-value pair or the plugin will be rejected. Change-Id: I578ccc35016af16fd30b3807e796fa63c0282f30 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>