summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-142-41/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| * Remove QLibrary code path specific to HP-UX on PA-RISCKonstantin Tokarev2018-02-121-33/+2
| | | | | | | | | | | | | | | | The only mkspecs that enabled QT_HPUX_LD were removed in ab44ac021de. Change-Id: I9f27f0b487b69c11d19ba76801e3926b7894e6e7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Handle OOM condition in the validation of plugin metadataAndre de la Rocha2018-01-191-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A large plugin dll (e.g., one with many MB of debug info) could cause a 32-bit application to crash when the entire dll file could not fit within the address space of the process. The code for validating a plugin library and retrieving metadata from it first tried to map the entire file in memory, which failed for large files, returning NULL. In this case, the code tried then to read the entire file via QFile::readAll(), which deep below caused a bad_alloc exception in malloc, resulting in the termination of the application. This change handles the case where the library could not be mapped into memory, in spite of memory mapping being supported, by reporting the error and returning false, making the plugin unavailable. [ChangeLog][QtCore][QPluginLoader] Fixed a bug that would cause the Qt plugin scanning system to allocate too much memory and possibly crash the process. Task-number: QTBUG-65197 Change-Id: I8c7235d86175c9fcd2b87fcb1151570da9b9ebe3 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Merge remote-tracking branch 'origin/dev' into 5.11Liang Qi2018-02-104-4/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvarlengtharray.qdoc src/corelib/tools/qvector.qdoc Resolved documentation changes in favor of 017569f702b6dd0, which keeps the move overloads along with its const-ref sibling. Change-Id: I0835b0b3211a418e5e50defc4cf315f0964fab79
| * | Support for LTTNG and ETW tracingRafael Roquetto2018-01-284-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces minimal support for instrumentation within Qt. Currently, only LTTNG/Linux and ETW/Windows are supported. Change-Id: I59b48cf83acf5532a998bb493e6379e9177e14c8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QUuid: add a way to get the string form without the bracesThiago Macieira2018-02-032-7/+121
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | While we're at it, add a way to get it without the dashes too. I'm calling it "id128", as in "128-bit ID", as seen in journald's sd_id128_t type and the sd_id128_xxx() API. [ChangeLog][QtCore][QUuid] Added a parameter to both toString() and toByteArray() to allow controlling the use or not of the braces and dashes in the string form. Change-Id: I56b444f9d6274221a3b7fffd150cde706cfc5098 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-021-4/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * | Fix -Wclazy-qstring-arg in Windows codeFriedemann Kleint2017-12-011-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | plugin\qlibrary_win.cpp(119,55): warning: Use multi-arg instead [-Wclazy-qstring-arg] plugin\qlibrary_win.cpp(155,55): warning: Use multi-arg instead [-Wclazy-qstring-arg] plugin\qlibrary_win.cpp(168,55): warning: Use multi-arg instead [-Wclazy-qstring-arg] socket\qlocalserver_win.cpp(228,61): warning: Use multi-arg instead [-Wclazy-qstring-arg] Change-Id: I0feadd3a5cce5ac2ba09630a38b867981d48a391 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | doc: Ensure GUID is declared for clangqdocMartin Smith2017-11-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Clang needs to see a declaration for GUID, or it will ignore some function declarations that must be documented. Change-Id: Ic5d5a88b82c709be7f763a44994b1c077977731a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-051-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/minimum-linux.S src/network/access/qhttpthreaddelegate.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Id2e817e85f85c68f5482c9a12912d35590f9d5f8
| * | QRandomGenerator: add system() and global()Thiago Macieira2017-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now,this does really nothing. This commit is just to allow us to transition the other modules (besides qtbase) to use the syntax that will become the API. I've marked three places to use the system CSPRNG: 1) the QHash seed 2) QUuid 3) QAuthenticator I didn't think the HTTP multipart boundary needed to be cryptographically safe, so I changed that one to the global generator. Change-Id: Ib17dde1a1dbb49a7bba8fffd14ecf1938bd8ff61 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-192-6/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-191-1/+2
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/io/qwindowspipewriter.cpp src/widgets/styles/qcommonstyle.cpp Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
| * Convert improper uses of qt_error_string() to QSystemError::stdString()Thiago Macieira2017-07-181-1/+2
| | | | | | | | | | | | | | | | | | On Windows, qt_error_string() returns the string corresponding to the Win32 API, not an errno. Replace those uses for a function that works for errno values. Change-Id: I1eba2b016de74620bfc8fffd14ccce6162bafdca Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QUuid, QHttpMultipart and QHash: use QRandomGeneratorThiago Macieira2017-06-122-88/+11
| | | | | | | | | | | | | | | | | | QRandomGenerator can produce more than 31 bits of data. And it uses /dev/urandom for us on Unix, so QHash does not need to duplicate that part. Change-Id: Icd0e0d4b27cb4e5eb892fffd14b52a0d91f179eb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-073-0/+5
|\| | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * QtCore: include mocsThiago Macieira2017-05-053-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compilation and link times in CPU seconds with GCC 7, using precompiled headers (not including moc, rcc, uic, etc. steps or headersclean): Before After Debug -O0 198,1 180,3 Debug -Og 240,7 229,2 Release -O3 267,1 249,2 Release LTO 239,4 229,8 QtCore required a little manual adjusting because some files are bootstrapped into moc itself and into qmake. Change-Id: I84e363d735b443cb9beefffd14b8b57c10e7da36 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | QUuid: add fromString(QStringView/QLatin1String)Marc Mutz2017-04-202-62/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As for the formatting code, de-duplicate the parsing code by only parsing char*s, converting QChars to Latin-1 first in a small buffer. The QUuid(const char*) ctor performed no length checking, relying instead on the checks performed within _q_uuidFromHex(), which includes an implicit check for premature end (because NUL is not a valid token for the parser). The (QString) and (QByteArray) ctors did perform length checking. To the extent possible, this is removed, since it is handled by _q_uuidFromHex(). Failure cases need not be optimized. Only the QLatin1String overload needs to do some checking, because views in general are not NUL-terminated. The QStringView overload can just append a NUL when it converts to Latin-1. The only check I added to _q_uuidFromHex() is that for src == nullptr. It would otherwise be duplicated in several callers. While touching the internal functions, port to passing and returning by value. Saves 1.6KiB in text size on optimized GCC 6.1 Linux AMD64 builds, even though we added new API. Port some users to the new functions. Expand fromString() test. [ChangeLog][QtCore][QUuid] Added fromString(QStringView/QLatin1String). Change-Id: I519339419129550c86e0ea80514865cd6a768f5d Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QUuid: de-duplicate uuid → string formattingMarc Mutz2017-04-191-28/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | The code was duplicated for QChar and char characters. Keep only the char version, and use QString::fromLatin1() to convert to QString. This does not perform more allocations. It just copies 38 bytes more than before. Saves 788B in text size on optimized GCC 6.1 Linux AMD64 builds. Change-Id: I1a65c8128eb2097e11527961618d54ea362e1b80 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devLiang Qi2017-03-2014-67/+52
|\ \
| * | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-2014-67/+52
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemengine_win.cpp src/gui/text/qdistancefield.cpp src/plugins/platforms/xcb/qxcbconnection.h Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
| | * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-1314-67/+52
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| | | * Use QT_CONFIG(library) instead of QT_NO_LIBRARYUlf Hermann2017-03-0614-67/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | | * streamline libdl detection and linkingOswald Buddenhagen2017-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of having a library and a test, use a library with two sources, the first being empty (i.e., just libc). this allows us doing away with the "libdl" feature, and using just the "dlopen" one. subsequently, replace all LIBS+=$$QMAKE_LIBS_DYNLOAD with QMAKE_USE+=libdl. the definitions of QMAKE_LIBS_DYNLOAD remain in the qmakespecs for backwards compat only. n.b.: the only specs where it is not empty or "-ldl" (i.e., what we support now) are the hpux ones, where the library is called 'dld'. technically, the "library" feature should depend on '!unix || dlopen', but that's for a later patch. Change-Id: Ib8546affc4b7bc757f1a76729573ddd00e152176 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | Use new QStringList::contains(QL1S)Anton Kudryavtsev2017-03-201-2/+2
|/ / / | | | | | | | | | | | | | | | | | | ... to reduce text size by replacing QStringLiteral with QL1S. Change-Id: I8166282d915f081ba816989039451466ec29e208 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* / / QFactoryLoader: use QStringLiteral more judiciouslyAnton Kudryavtsev2017-03-191-2/+2
|/ / | | | | | | | | | | | | | | Replace it with QL1S in overloaded functions. Saves some text size. Change-Id: Ie1436a787fb3052157880234ca180fefce5a8412 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-244-14/+13
|\| | | | | | | | | | | | | Conflicts: mkspecs/features/moc.prf Change-Id: Ia71c8e3b3185f7c999bf226d0675051b10b8740b
| * Move qJsonFromRawLibraryMetaData into qfactoryloader_p.hUlf Hermann2017-02-224-14/+13
| | | | | | | | | | | | | | | | | | This is still not a great place for it, but this way we can Q_REQUIRE_CONFIG(library) in qlibrary_p.h and qfactoryloader_p.h is the only private header that doesn't require library support in plugin.pri. Change-Id: Ia6c1ac8799822eca1e0cbeca98d1c1b8de74beae Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Liang Qi2017-02-171-21/+9
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-161-21/+9
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/plugin/qlibrary_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp Change-Id: I632c400d909f8c204f55743aadc7886af2f15dfb
| | * Eliminate QT_NO_DYNAMIC_LIBRARYUlf Hermann2017-02-161-21/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | The library feature already covers this. As library depends on the dlopen compile check, we can assume dlopen to be available, also on vxworks. Change-Id: Idcdb07ab4688c6158651d9a5ad5e2ba126bd7d9e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Use static initialization for QBasicAtomicsMarc Mutz2017-02-161-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | A default-constructed static QBasicAtomicInt at function scope will be dynamically initialized. It will still be zero-initialized, but at least GCC adds guard variables for such objects. When using aggregate initialization, the guard disappears. Amends 04d6495bf773a6bb0d4fa6980df22d3b81a605b0. Change-Id: Id9335cffdd43094cafb231fdde2523d013abe1d6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make some atomic counters zero-basedMarc Mutz2017-02-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A variable of static storage duration that is not zero-initialized takes up space in the DATA segment of the executable. By making the counters start at zero and adding the initial value afterwards, we move them over to the BSS segment, which does not take up space in the executable. Wrap atomics used across function boundaries into small functions, to avoid code duplication and to increase readability. Change-Id: Ida6ed316ecb8fe20da62a9577161349e14de5aed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QElfParser: Fix plural form in error messageFriedemann Kleint2017-02-151-4/+6
| | | | | | | | | | | | | | | | Amends change dcec1420ea9d7e90bbd7f37be15d8e61eaf35d23. Change-Id: I54c7db012d87a55c310141debac19118e7cb284a Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-141-21/+13
|\| | | | | | | Change-Id: I2bd2e61bae1eab4fc74fa6accd741ed9ae1f0669
| * Fix QLibrary::isLibrary on Apple platformsFilipe Azevedo2017-02-121-21/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add proper support for 'so' and 'bundle' suffixes. Qt wrongly assumes .so libraries are not versioned on Apple platforms, which is wrong. Also, the shared library .bundle which is what Apple recommends instead of .so, are also versioned (not to be confound with the different Core Foundation bundles, which are directory hierarchy). For more info, see http://docstore.mik.ua/orelly/unix3/mac/ch05_03.htm. Especially the part that reads: "Loadable modules, called bundles in Mac OS X, have the file type MH_BUNDLE. Most Unix-based software ports usually produce bundles with a .so extension, for the sake of consistency across platforms. Although Apple recommends giving bundles a .bundle extension, it isn't mandatory." Task-number: QTBUG-50446 Change-Id: Iacd5136397a12d65d83821434f332eb602550b4b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-251-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/common/msvc-version.conf mkspecs/common/winrt_winphone/qmake.conf mkspecs/features/mac/default_post.prf mkspecs/features/mac/sdk.prf mkspecs/features/qt.prf mkspecs/features/uikit/default_post.prf mkspecs/features/winrt/default_pre.prf mkspecs/winphone-arm-msvc2013/qmake.conf mkspecs/winphone-x86-msvc2013/qmake.conf mkspecs/winrt-arm-msvc2013/qmake.conf mkspecs/winrt-x64-msvc2013/qmake.conf mkspecs/winrt-x86-msvc2013/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/gui/kernel/qwindowsysteminterface.cpp src/network/kernel/qhostaddress.cpp src/plugins/platforms/mirclient/qmirclientplugin.cpp src/plugins/platforms/mirclient/qmirclientplugin.h src/widgets/util/qsystemtrayicon.cpp tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp tools/configure/Makefile.mingw tools/configure/Makefile.win32 Done-with: Jake Petroules <jake.petroules@qt.io> Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
| * Fix race condition in QFactoryLoader: lock the mutex we already haveThiago Macieira2016-12-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The process of loading a plugin is examplified by the qLoadPlugin function (though not all users of QFactoryLoader use this function, they all do something similar): const int index = loader->indexOf(key); if (index != -1) { QObject *factoryObject = loader->instance(index); if (FactoryInterface *factory = qobject_cast<FactoryInterface *>(factoryObject)) if (PluginInterface *result = factory->create(key, std::forward<Args>(args)...)) return result; } QFactoryLoader::indexOf already locked the mutex, but not QFactoryLoader::instance. This commit fixes that. Note that calling the virtual create() in the plugin's factory is not protected by the mutex. Each plugin's factory must be thread-safe and also create an object that works on any thread too. It's also the responsibility of the caller of qLoadPlugin to ensure that it's called thread-safely. Task-number: QTBUG-42855 Change-Id: I63e21df51c7448bc8b5ffffd148ebee33d4c47de Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Use QString::asprintf(), QStringBuilder, and the multi-arg overload of ↵Alexander Volkov2017-01-122-27/+27
|/ | | | | | | | | | | | | QString::arg() ... instead of sequential .arg(const QString &) callings. It saves memory allocations and prevents unexpected results if replacing strings contain place markers. Found with clazy's qstring-arg check. Change-Id: I3912275a6e11c6fb7559ff5623f2e8cde9b7f07a Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge dev into 5.8Oswald Buddenhagen2016-08-222-5/+5
|\ | | | | | | Change-Id: I41ee7b50534b01cf042bed8bb8824ba2e5026a29
| * Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-162-5/+5
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
| | * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-132-5/+5
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/io/qsettings.cpp src/corelib/itemmodels/qstringlistmodel.cpp tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
| | | * Doc: Change instances of '(Mac) OS X' to 'macOS'Topi Reinio2016-08-122-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change the occurrences where the Mac platform is discussed to use a macro \macos, which expands to 'macOS'. This helps with adapting to future renaming. Update the instructions on mac-specific Q_OS_* macro usage. Add a \target for the old 'Qt for OS X' topic to keep links working for other documentation modules that try to link with the old name. Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | | QFactoryLoader: clean up #ifdefsMarc Mutz2016-08-151-64/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | We require Q_COMPILER_RVALUE_REFS (implicitly used, but not explicitly checked for) and Q_COMPILER_VARIADIC_TEMPLATES since Qt 5.7, so remove the non-variadic version which anyway has zero test coverage. Change-Id: Ie3658ff6ae71a66df9d35100c3d6df41f2326c80 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-011-2/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure 5.7 now supports clang on android; but dev re-worked configure src/gui/kernel/qevent.h One side renamed a parameter of a constructor; the other added an alternate constructor on the next line. Applied the rename to both for consistency. tests/auto/tools/moc/tst_moc.cpp Each side added a new test at the end. .qmake.conf Ignored 5.7's change to MODULE_VERSION. configure.json No conflict noticed by git; but changes in 5.7 were needed for the re-worked configure to accommodate 5.7's stricter handling of C++11. Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
| * | Update QLibrary's debug output when loading failedThiago Macieira2016-07-201-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | We were printing 'loaded library "xxx"' even when ret == false, which was misleading. So instead print the error string. Change-Id: Ib57b52598e2f452985e9fffd1459ea860ed2dfcf Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Fix/adapt the uses of {to,set,from}Time_t in the qtbase source codeThiago Macieira2016-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move those to the equivalent {to,set,from}SecsSinceEpoch(), except for the cases that did QDateTime::currentDateTime{,Utc}().toTime_t. Those are best implemented with QDateTime::currentSecsSinceEpoch(). Change-Id: Ib57b52598e2f452985e9fffd145a366c92cfda20 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | CoreLib: use QStringRef to optimize memory allocationAnton Kudryavtsev2016-07-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Create QString from QStringRef only where necessary. Change-Id: Id9ea11b16947220cd27787c0b529de62d10b6c26 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Make sure all private headers in Qt Core include qglobal_p.hThiago Macieira2016-06-254-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rule was: - if the header included qglobal.h, turn that into qglobal_p.h - otherwise, insert the #include after the "We mean it" warning qglobal_p.h currently only includes qglobal.h. Change-Id: Ib056b47dde3341ef9a52ffff13ef677e471674b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-231-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/common/mac.conf mkspecs/features/configure_base.prf mkspecs/features/configure.prf mkspecs/macx-clang-32/qmake.conf mkspecs/macx-clang/qmake.conf mkspecs/macx-ios-clang/qmake.conf src/network/ssl/qsslsocket_openssl_symbols_p.h Change-Id: I768b592e8e589662b1fdb9b8cbd633fef26845b6