summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove QPageSetupWidget::selectPrinterAlbert Astals Cid2017-12-063-14/+4
| | | | | | | t's only ever called after setPrinter so merge the code Change-Id: I4b5d593edbe62b64354e81c19112fa87b0555fdc Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Remove QPrintPropertiesDialog::selectPrinterAlbert Astals Cid2017-12-061-15/+15
| | | | | | | It is only ever called after the constructor, so merge the code Change-Id: I5c75a2cd367af401b41920f51754a64dc6c6eb40 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Remove QCupsJobWidget::setPrinterAlbert Astals Cid2017-12-063-11/+5
| | | | | | | It is only ever called after the constructor so merge the code Change-Id: I381165ad90c85342e5db3c16327d729388b71fb2 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Remove QPrintPropertiesDialog::applyPrinterPropertiesAlbert Astals Cid2017-12-061-15/+6
| | | | | | | It's only ever called after the constructor so merge its code to the constructor Change-Id: Icca88764f725b9aeaa08ee7387da8885be247fba Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Remove QUnixPrintWidgetPrivate::applyPrinterPropertiesAlbert Astals Cid2017-12-061-45/+35
| | | | | | | | | And move it's code to the only place it is called, the QUnixPrintWidget constructor, that means we can remove the if that checks if propertiesDialog is not null since at that stage we know it is null Change-Id: I81cdaa0505fa6fe64a45c7d1f5c3e277400cbbf7 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Remove QPrintDialogPrivate::applyPrinterProperties, no one calls itAlbert Astals Cid2017-12-061-8/+0
| | | | | Change-Id: Ic140f62e5cb63c6a4b7f4fa10ca243d8bb055c4e Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* xcb: remove redundant QT_XCB_DEBUG_XINPUT* envvarsGatis Paeglis2017-12-061-6/+0
| | | | | | | | | | | | | In Qt 5.4 these envvars were replaced with categorized logging 59ba84d31cf17d86e615e2958fece6f6e0bbefe2. This is not a public API, the log output is useful mostly for developers and it can still be used via QT_LOGGING_RULES, so there is no good reason to keep the old envvars around. By using QT_LOGGING_RULES, we can access even more xinput2 logs than is available via QT_XCB_DEBUG_XINPUT*. Change-Id: I2b12b8696043bc8bf8310f49f0cdc2ba1b8708ba Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* doc: Add class qualifiers to parameter typesMartin Smith2017-12-068-24/+46
| | | | | | | | This change supplies several missing class qualifiers for parameter types and function return types. Change-Id: I569026e4da0948902fcc13557003d3748b85dd82 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Document remaining anonymous enumsMartin Smith2017-12-065-0/+35
| | | | | | | | This change adds qdoc comments for the remaining nameless enum types. Change-Id: I4da8b67883c8020323437cf74c938d3655d8c384 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Add missing template text to \fn commandsMartin Smith2017-12-062-92/+92
| | | | | | | | | | | | | | | | | | | | | | This update corrects about 200 qdoc warnings caused by incomplete \fn commands for member functions of template classes. It can be used as an example of how to fix \fn commands that suddenly cause qdoc warnings now that qdoc uses clang to parse the \fn commands. For example, with the old qdoc, we had this \fn command, which the old qdoc handled correctly: \fn QAtomicInteger::operator T() const For the new clang-based qdoc, this \fn command must be written this way: \fn template <typename T> QAtomicInteger<T>::operator T() const However, the documentation generated by the clang-based qdoc looks the same as it did in the old qdoc. Change-Id: I7803b3b7ec7c6b8b3cc1be789bc36921438f527e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* styles: port away from QRegion::rects()Marc Mutz2017-12-061-3/+1
| | | | | | | | | | | Use begin()/end() instead. Drop the special handling of rectCount() == 1, since with begin()/end(), we no longer take the hit of creating a QVector just to be able to return it from rects(). Change-Id: I19ebc38267951c80bc71aa9d2b5df7403d710064 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* platform plugins: port away from QRegion::rects()Marc Mutz2017-12-066-20/+17
| | | | | | | Use begin()/end()/rectCount() instead. Change-Id: I5c642c4a2c64da65d3f37159396c86073818ca95 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QtTestLib: port away from QRegion::rects()Marc Mutz2017-12-061-3/+3
| | | | | | | | Use begin()/rectCount() instead. Change-Id: I08cef424bf24ecf3c058e9b87411f2a5775ffb33 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* doc: Fix qdoc errors in qfsfilengine.cppMartin Smith2017-12-051-4/+8
| | | | | | | | | | A few parameter types in \fn commands were not qualified with their class name. They had to be qualified because they were in a base class of the class being documented. Change-Id: Ic0b43be689d17a0a539ee977c0db6e20eb05d5fe Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* minimal QPA: Make font DB creation more flexibleGabriel de Dietrich2017-12-043-7/+30
| | | | | | | | | | | | Prioritize CoreText over Fontconfig since the former is the native one on macOS, and any other native font DB on its respective platform. We introduce a new 'fontconfig' option to allow using Fontconfig instead. This works similarly to 'freetype' overriding the default font engine on Windows. A propos of which, 'freetype' now does the same on macOS. Change-Id: Ic8168820d1d01fddc2f26e046abb65b8ab765f89 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* doc: Fix all qdoc errors in qnumeric_p.hMartin Smith2017-12-041-1/+2
| | | | | | | | | | These errors resulted from clang parsing function declarations for functions that were not meant to be documented. Here they are hidden from clang with #ifndef Q_CLANG_QDOC Change-Id: I256b49830b63188bf0a685cb393d469f2f2ca315 Reviewed-by: Martin Smith <martin.smith@qt.io>
* doc: Add missing template textMartin Smith2017-12-041-1/+3
| | | | | | | | | | | | There are two fake classes in qendian.h that exist only documenting a lot of operator functions, but now that clang is being used to parse all C++ code, when a class is a template class, clangqdoc must see its template stuff to recognize template type T, for example. Hence, this update adds template<typename T> to some fake class declarations used only for documentation purposes. ie, inside #ifdef Q_CLANG_QDOC. Change-Id: I1988b77cd7f3bb97067e7107dd00de34770e9fed Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Fix qdoc errors for \fn commands in endian functionsMartin Smith2017-12-041-42/+42
| | | | | | | | | | This change updates the \fn commands in the endian functions, which are template-based. clangqdoc now parses these \fn commands and expects to see all the template stuff in the signatures. Change-Id: I94c1aba8d710c97b8d41184d64b5341c88ece297 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Add template text to \fn commands for QGlobalStaticMartin Smith2017-12-041-6/+6
| | | | | | | | | The \fn commands were not recognized by clang-qdoc because the template stuff was missing from the \fn commands. This update adds the correct template text and parameters. Change-Id: I920d9cc4bef710f276267a34b6b9d49f7412adb0 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Support ForwardKeyEvent signal in ibus input contextPeng Wu2017-12-042-0/+38
| | | | | | | | | | | For ibus-hangul, it needs ForwardKeyEvent signal to fix the commit issue. [ChangeLog][plugins][ibus] Support ForwardKeyEvent signal Change-Id: If41e75bed9ec4e3126db05c8ece4a51d2bc3c3fd Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove two obsolete qdoc commentsMartin Smith2017-12-031-37/+0
| | | | | | | | | | | | | | | The macros Q_GLOBAL_STATIC(Type, VariableName) and Q_GLOBAL_STATIC_WITH_ARGS(Type, VariableName, Arguments) were documented in qglobal.cpp, but both qdoc comments were marked \internal. More recent documentation for the macros also exists in qglobalstatic.qdoc, and the qdoc comments there are not marked \internal. clang-qdoc reports errors indicating that both macros havew been documented in two places. This update removes the older comments that are marked \internal. Change-Id: I1c319b831d705d86eb4142b9963dbf56edc72772 Reviewed-by: Martin Smith <martin.smith@qt.io>
* doc: Fix qdoc errors for \fn commands in QGenericMatrixMartin Smith2017-12-031-29/+29
| | | | | | | | | This change updates the \fn commands in QGenericMatrix clangqdoc now parses these \fn commands and expects to see all the template stuff in the signatures. Change-Id: Icf815606f98271aae1959adc633e918e7f241aa0 Reviewed-by: Martin Smith <martin.smith@qt.io>
* QProcess/Unix: do not toggle a state of the write notifier twiceAlex Trotsenko2017-12-021-5/+4
| | | | | | | | | | | | | | | _q_canWrite() unconditionally disabled the write notifier before the writing, and might have enabled it again afterwards. This caused unnecessary processing in the event dispatcher and could result in extra system calls. Actually setting the state at the moment when the write buffer size is determined is enough. Change-Id: I81f9ec27d95a5a9bdb83cc6a842b6ae95f002b96 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* doc: clangqdoc needs to see all GLxxx typedefsMartin Smith2017-12-021-0/+6
| | | | | | | | Clang needs to see declarations for GLclampf, GLSizei, and GLboolean. Change-Id: Id1c1310e4877b32bb8fc2e6d4f743999842b3f06 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Add default openGL typedefs for clangqdocMartin Smith2017-12-022-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | When Q_CLANG_QDOC is defined, ensure that the following openGL types are defined: typedef int GLint; typedef int GLsizei; typedef unsigned int GLuint; typedef unsigned int GLenum; typedef unsigned int GLbitfield; typedef float GLfloat; typedef float GLclampf; typedef bool GLboolean; typedef void GLvoid; typedef char GLchar; Running clangqdoc with these on macOS fixed over 500 qdoc errors! There were also some functions that declared the parameter list as void. It was also shown as void in the \fn command for each function in the .cpp file, which is wrong. When the function is declared in the header as int func(void), it should just be \fn int classname::func() in the .cpp file. Change-Id: I6489d499f0830e5ba97c085ed5dadfad5affecb7 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Fix three "Cannot tie" errorsMartin Smith2017-12-024-4/+4
| | | | | | | | | | Two of the three functions were for functions that should not be documented. The third was a function protected by #ifndef Q_OS_DARWIN, which required a test of Q_CLANG_QDOC in the header and cpp files. Change-Id: Id2ab3e4f2ea896dc628a622de2e80a19c18eb9fe Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Fix some ref qualifier documentation errorsMartin Smith2017-12-021-3/+8
| | | | | | | | | | Some member functions of QImage were upgraded to use ref qualifiers, but the documentation wasn't updated correctly to account for this. This change update the documentation for those member functions to show the ref qualifiers in the documentation. Change-Id: I0ff4011e9d0251062d5616d69e9dda6bdbc1c136 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Don't let qdoc see some defines that cause troubleMartin Smith2017-12-022-1/+3
| | | | | | | | | | | This update surrounds some #defines with #ifndef Q_CLANG_QDOC because they define some names that conflict with formal parameter names. Otherwise, clang starts replacing formal parameter names with $27 etc, when qdoc runs, and that causes trouble for qdoc. The change also replaces one use of Q_QDOC with Q_CLANG_QDOC. Change-Id: I6e93bf1e0d30d7590280b6f18f0e694556050685 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Correct a few minor qdoc errorsMartin Smith2017-12-023-6/+6
| | | | | | | | | A use of Q_QDOC is changed to Q_CLANG_QDOC. A misspelled std type name is corrected. A few extraneous ';' are removed. Change-Id: Ic49f64a3b97f645268a8ecbbca5f0eef0456bb33 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Correct all remaining clangqdoc warnings in qpointer.cppMartin Smith2017-12-021-22/+22
| | | | | | | | This update corrects many qdoc warnings in qpointer.cpp caused by incomplete \fn commands. Template stuff was added to the \fn commands. Change-Id: I39bcd5db1cb4257d574918155dc49414a8b00c3d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Correct all remaining clangqdoc warnings in qdebug.cppMartin Smith2017-12-021-59/+64
| | | | | | | | | | | This update corrects many qdoc warnings in qdebug.cpp caused by incomplete \fn commands. It also corrects many undocumented parameter errors caused by clang's requirement that the formal parameter names be the same in both the declaration in the include file and the \fn command. The name changes don't seem to be objectionable in this file. Change-Id: I0630a0e05e651b58608b2f2116df70dcf0e83a45 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Add missing template text and parametersMartin Smith2017-12-024-104/+109
| | | | | | | | | This update corrects many qdoc warnings in the documentation for the QFuture classes caused by incomplete \fn commands. Template text and parameters was added. Change-Id: I360c9db191230b19a9b174a43468d3de1eb24549 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Fix qdoc errors for \fn commands in algorithm functionsMartin Smith2017-12-021-29/+29
| | | | | | | | | This change updates the \fn commands in qalgorithms.qdoc. clangqdoc now parses these \fn commands and expects to see all the template stuff in the signatures. Change-Id: Id9492bf80eca494eb2b5b8d7364b8485ed1a047e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Add template text to \fn commands in QPairMartin Smith2017-12-021-17/+17
| | | | | | | | | The \fn commands were not recognized by clang-qdoc because the template stuff was missing from the \fn commands. This update adds the correct template text and parameters. Change-Id: I49302d0792c8a4c5a36c671142796a48d384b548 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Add template text to \fn commands in cache classesMartin Smith2017-12-012-54/+54
| | | | | | | | | | The \fn commands were not recognized by clang-qdoc because the template stuff was missing from the \fn commands. This update adds the correct template text and parameters. Removes about 150 qdoc warnings. Change-Id: I63c6cae5613f0bb23527607230b6edf7fac33740 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Add template text to \fn commands in QVarLengthArrayMartin Smith2017-12-011-75/+75
| | | | | | | | | | The \fn commands were not recognized by clang-qdoc because the template stuff was missing from the \fn commands. This update adds the correct template text and parameters. This change eliminates about 150 qdoc warnings. Change-Id: I23632e739b529cd56a6cae1a29df2e7131a05292 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Revert "QApp: Method to check for native style usage."Alexander Volkov2017-12-012-28/+0
| | | | | | | | | | | | | | | | | This reverts commit 958a4c9087e03502d0173735df4611a7f96a0463. QApplicationPrivate::usesNativeStyle() introduced by that commit was never used. We have an untested method that is furthermore may return wrong results because it relies on the comparison 'app_style->objectName() != QApplicationPrivate::desktopStyleKey()', but not all styles set their object names. Conflicts: src/widgets/kernel/qapplication.cpp src/widgets/kernel/qapplication_p.h Change-Id: I48d221f9387381db9ed51a7a068bfd0a0c2ed58d Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
* Disable some implicit conversions with QT_RESTRICTED_CAST_FROM_ASCIIAlexander Volkov2017-12-011-0/+4
| | | | | | | | | | Non-const arrays are not literals, so their encoding may be not defined at compile-time and they should be converted explicitly. Change-Id: I2a65e095224f48efafeaa97fd85134697a1e5bf0 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMetaObject::Connection: mark move ctors Q_DECL_NOTHROWMarc Mutz2017-12-011-4/+2
| | | | | | | Drop the #ifdef Q_COMPILER_RVALUE_REFS - we require that since Qt 5.7. Change-Id: Ib4c6f559b014915f43875ec6791bfda3f24a109b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QImage: Output some bytes of first scanline on verbose debug streamsFriedemann Kleint2017-12-011-2/+9
| | | | | Change-Id: I1003c2b4109112fb2d2733a156120a041d7bd695 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Copy the numericalPrecisionPolicy when copying the QSqlDatabaseAndy Shaw2017-12-011-0/+4
| | | | | | | | | | As the numercialPrecisionPolicy can be set and subsequently retrieved from the QSqlDatabase's driver, then when copying the QSqlDatabase, we need to set that appropriately too. Task-number: QTBUG-10452 Change-Id: I2c63748365ab4e9fbc29d8d460d80d2e2a0ee385 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove code that refers to PostgreSQL 7.2 or olderAndy Shaw2017-12-011-148/+54
| | | | | | | | | | We haven't had support for anything older than 7.3 for a long time, so this removes the code to save having to maintain it any further. Task-number: QTBUG-644 Change-Id: If0635f3bef5138a00a0e77011a70f23d0bffda32 Reviewed-by: Robert Szefner <robertsz27@interia.pl> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add template text to \fn commands in container classesMartin Smith2017-12-016-761/+882
| | | | | | | | | | The \fn commands were not recognized by clang-qdoc because the template stuff was missing from the \fn commands. This update adds the correct template text and parameters. It eliminates nearly 2000 qdoc warnings. Change-Id: Ibe047424396a8f99f8bd64efea1b0d8cc7c7527d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* macx-clang: Opt-in xcb QPA support with XQuartzGabriel de Dietrich2017-12-016-19/+29
| | | | | | | | | | | | | | | | | | | | | | | | Enable xcb QPA plugin when XQuartz is available. This is done in a single build, alongside the Cocoa version. We delegate part of the configuration stage to pkg-config, so this becomes a requirement. Ensure that PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/opt/X11/share/pkgconfig is in your environment, or pkg-config is properly set up. Tested with the following configure options: configure \ -pkg-config \ -fontconfig -system-freetype \ -system-xcb -xkb -no-opengl \ -qt-xkbcommon -qt-xkbcommon-x11 Change-Id: I2eb5a0491172368afc4c629c540cbef08580348d Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QtServiceSupport: Remove redundant conditionGabriel de Dietrich2017-12-011-2/+1
| | | | | | | | | | | | | The condition for the 'services' sub-project in platformsupport.pro was identical to the one guarding genericunix.pri in services.pro. We can't remove the condition in platformsupport.pro because that would result on an empty static library, which is not supported on some platforms, like macOS. Change-Id: I5c80737d9527bdd75dde44e33e5063f3d7aeecb7 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Simplify date-time formatting in textForRole()Edward Welbourne2017-11-301-6/+3
| | | | | | | | | | | | | | | | | QAbstractItemDelegatePrivate::textForRole() was formatting date and time separately, then gluing the parts back together with space. QLocale can do that just fine itself (it has a toString() overload that handles a QDateTime) and might even (some day) do it better. To my mild surprise, this proved sufficient to fix a problem with date-time display in tool-tips, when the date-time includes a zone. Extracted the date-time part of an existing selftest into a test of its own and extended it to test times of each spec-type; verified that the non-local spec cases of this all failed before this fix. Task-number: QTBUG-61069 Change-Id: I6d6be0c27be9a557d8afc3ced200a10b2aaff816 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Clean up in TZP-Win's calculateTransitionLocalDate()Edward Welbourne2017-11-301-19/+28
| | | | | | | | | | | | | | It's decoding a SYSTEMTIME in the slightly quirky manner of MS's timezone APIs (year 0 means annual, with wDay as 1 through 4 for the first through fourth, or 5 for the last, of a specified week-day within a month) and the calculations to go with it were a little opaque. So clean it up, document what it's doing (and why) and assert some things that should be true. Also, only copy one int, instead of a whole structure, to change from their day-numbering to ours. Expand on a related TODO comment in its caller, at the same time. Change-Id: Iffd95c094c37fc1081b73b2a267cfdcd29aeb4ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Pull several structs and static functions into an anonymous namespaceEdward Welbourne2017-11-301-22/+24
| | | | | | | | | | The implementation of QWinTimeZonePrivate used many static functions and at least one struct; to which I've added. Put these all into an anonymous namespace (thereby keeping the struct types out of the linker's sight): make them local the C++ way, rather than the C way. Change-Id: Ibdce0865234b5d4ebbdc90628cc4d9e790ed6321 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fake a "first transition" at the start of timeEdward Welbourne2017-11-301-0/+9
| | | | | | | | | | | | | | QTimeZonePrivate::dataForLocalTime() needs a transition before the time it starts at; MS's time-zone data tends to omit old zones (before 2007, in the case of Win7 for Casablanca - which had interesting transitions before that), so all we can do is extrapolate backwards from there; but a first rule is indeed apt to be a no-transition rule, describing the zone's status up to the first known transition. So fake a "start of time" transition to return for this case, that describes this prefix of history. Change-Id: Iaf178cbebc3b1e599cbde3437a0af75d9f6ca432 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Avoid underflow on arithmetic with possibly-first transition timesEdward Welbourne2017-11-301-2/+2
| | | | | | | | | | A transition time may represent the beginning of time; as such, arithmetic on it might underflow, e.g. on adding a negative zone offset to compare with a given time. So move the arithmetic to the other side of the comparison in such cases. Change-Id: I1697a03ebf74679ff86059664dd2b173b9c4c367 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>