summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-09560-18734/+20464
|\ | | | | | | Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
| * Removing a few unneeded "? true : false"Alessandro Portale2014-10-0917-32/+30
| | | | | | | | | | | | | | Change-Id: Ib13f0ddd65fe78f5559f343f2fc30756b1d3ef76 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Don't stream QStringLiterals into QDebugMarc Mutz2014-10-094-10/+10
| | | | | | | | | | | | | | | | Normal (C) string literals do just as well and use more than twice less space in the DATA section. Change-Id: Iafb0682a362c41dfd5b4d8b9137d88014d7992a2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QFactoryLoader: de-duplicate two QStringLiteralsMarc Mutz2014-10-091-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | When seemingly identical QStringLiterals are used in different functions, due to the use of lambdas and scoping, they produce different lambda types and thus duplicated QStringLiteral data. Fix by moving the QStringLiterals into inline functions and calling those instead. Change-Id: Ifaa124ec74e201ccc63fd9afce042f8b2ff22b9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Don't use QStringLiteral in startsWith/endsWidthMarc Mutz2014-10-096-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For QLatin1String, startsWith/endsWith is overloaded, so comparing to a latin-1 (C) string literal is efficient, since strlen() is comparatively fast. OTOH, QStringLiteral, when not using RVO, litters the code with QString dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just use QLatin1String instead. Change-Id: I7eaf464c67b55116f970fe7f58a85f19ce4d254e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Don't use QStringLiteral in comparisonsMarc Mutz2014-10-0931-61/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For QLatin1String, operator== is overloaded, so comparing to a latin-1 (C) string literal is efficient, since strlen() is comparatively fast. OTOH, QStringLiteral, when not using RVO, litters the code with QString dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just compare using QLatin1String instead. Change-Id: I7af3bf3a67c55dae33ffaf9922d004fa168a3f9c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Don't use QByteArrayLiteral in comparisonsMarc Mutz2014-10-097-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For const char*s, operator== is overloaded, so comparing to a (C) string literal is efficient, since qstrcmp doesn't require the length of the strings to compare. OTOH, QByteArrayLiteral, when not using RVO, litters the code with QByteArray dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just compare with a (C) string literal instead. Change-Id: Id3bfdc89558ba51911f6317a7a73c287f96e6f24 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * moc: don't use QByteArrayLiteralMarc Mutz2014-10-091-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The byte array literals are only used to append them to another QByteArray, so they offer only the static size calculation as a benefit. However, there are several drawbacks: - QByteArrayLiteral data cannot be shared the way string literals can be, not even within a single TU, and they add a few ints for the QByteArrayData header which cannot reside in BSS, but need to be stored in DATA. - QByteArrayLiteral *does* allocate when the compiler doesn't support C++11 lambdas. - QByteArrayLiteral, when not using RVO, litters the code with QByteArray dtor calls, which are not inline, and thus can't be optimized away. In particular, when used like this, they do not prevent any memory allocation (in fact, they might add some, absent lambdas). So, just append (C) string literals. Change-Id: Iee5dba8dd970c5cc6df116afc1f8709a62356b06 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Fix license text and URLs in QMessageBox::aboutQt().Friedemann Kleint2014-10-091-13/+10
| | | | | | | | | | | | | | | | | | Point to new qt.io site, adapt licensing text. Task-number: QTBUG-41798 Change-Id: I492df6a842c2b31e44653fb4388408c209f24f1e Reviewed-by: Sami Makkonen <sami.makkonen@digia.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
| * Fix executable name of mousebuttons example.Friedemann Kleint2014-10-091-1/+1
| | | | | | | | | | Change-Id: Icf41ade3a4d2d14535e6fd42212b27ac01c5177f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * fix VS 2008 project file generationJoerg Bornemann2014-10-091-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4f21eb03 utterly broke the project file generation for VS 2008. The introduced filterByName convenience methods looks for filter names like "Generated Files", but the code path for VS <= 2008 used filter names like "GeneratedFiles". The generated projects were valid but empty. This commit ensures that both VS generators use the same filter names. Task-number: QTBUG-41821 Change-Id: I828fa911bae8d835b073a4c2260316127cc72cda Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * fix vcxproj generation for CONFIG-=flatJoerg Bornemann2014-10-092-16/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4f21eb03 broke the generation of non-flat vcxprojs. XTreeNode passes filter names to outputFileConfigs that have the source subdirectory suffixed (e.g. "Generated Files\subdir"). That's why the original code tested the filter names with QString::startsWith. I've changed the signature of outputFileConfigs to take a filterId parameter which contains the unaltered filter name (e.g. "Generated Files") that will determine the correct filter. Task-number: QTBUG-41746 Change-Id: If33428526a098f433cd6ceb8ab6608bd9f94ef17 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * QCss: mark many classes as movableMarc Mutz2014-10-081-0/+24
| | | | | | | | | | | | | | | | | | Most of these are held in QVectors, so let QVector use the optimized reallocation strategy. Change-Id: I6c2182465c283705bd5ec761e3d2d3d072bc6207 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * QCss: Move declaration of ValueExtractorMarc Mutz2014-10-081-39/+34
| | | | | | | | | | | | | | | | | | | | Move it to the end of the header, since it was sitting right in the middle of AST struct definitions without being one itself. Change-Id: I017d6187324e91f2745629dbed4271064d4e59a8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * QCss: unexport some classesMarc Mutz2014-10-081-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | and export only the non-inline functions inside them. Inline functions don't need exporting, and some compilers are known to have problems inlining inline functions of exported classes. Change-Id: I843adc0ab493817e71f48ab87bfefb03d4ca918d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * iOS: add system paletteRichard Moe Gustavsen2014-10-082-0/+13
| | | | | | | | | | | | | | | | Return a system palette that sets the correct highligh (text selection) colors. Change-Id: Ic0a18f931913f28bdc73d9ec4ae347fe38839f17 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * Add text ranges to QGlyphRunPrivateEskil Abrahamsen Blomfeldt2014-10-082-8/+69
| | | | | | | | | | | | | | | | | | | | | | | | This is an enabler for using the QGlyphRun in the selection code of the scene graph node. In this case, we need to know exactly which of the characters in the text are represented by the glyph run, as a single range of text may result in several glyph runs. Change-Id: Ie8ec942693dceea45ab548f6cefc4f78e4c6d524 Task-number: QTBUG-41808 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * WinCE: fix DLL build errors with CONFIG+=consoleJoerg Bornemann2014-10-085-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit cd1dff75, we use QMAKE_LFLAGS_CONSOLE when linking DLLs that are built with CONFIG+=console. Thus, we must not pass options that are specific to linking executables. [ChangeLog][qmake] WinCE makespecs must not add /ENTRY: to QMAKE_LFLAGS_CONSOLE and more. The flag is hard-coded in console.prf now. This is a side effect of making it possible to specify a subsystem for DLLs. Change-Id: Ib481fd45b12140f9f05bf123db7152a3ddf0fa04 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * qdoc: Fix generation of qhp sections for unsorted pagesTopi Reinio2014-10-081-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you had the following lines in .qdocconf: qhp.QtFoo.subprojects.examples.title = Examples qhp.QtFoo.subprojects.examples.indexTitle = Qt Foo Examples qhp.QtFoo.subprojects.examples.selectors = fake:example The expected outcome is to see an unsorted list of examples. This didn't work however, because QDoc assumed to find a chain of \nextpage links for the indexTitle, and these are rarely used in Qt documentation nowadays. This commit ensures that all pages matching the defined selectors will be listed under the section title, even when the sortPages flag is not set. Task-number: QTBUG-41737 Change-Id: I1e7e2a2953de949c9b52763165c406a64d1d46f7 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * Change documentation links to point to qt.io.Friedemann Kleint2014-10-081-3/+3
| | | | | | | | | | | | Task-number: QTBUG-41798 Change-Id: I3a9edc5798d67da60ed1ea55540e2fcdd2e87371 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
| * Utilize Q_FORWARD_DECLARE_OBJC_CLASS in QCocoaFileDialogHelper.Jake Petroules2014-10-082-34/+25
| | | | | | | | | | | | Change-Id: I94ae91ac8fb625de4a328c6628ce0ab45919708f Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * Fix compilation of MIPS with ClangThiago Macieira2014-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | Clang always sets __mips to 1, unlike GCC. To detect a higher MIPS arch, we need to rely on the _MIPS_ARCH_MIPSxxx macros being defined -- or, in this case, _MIPS_ARCH_MIPS1 not being defined. Change-Id: Ib6846a6892a4c1e17e595a69305b7e46a5303ee7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Adrian Perez de Castro <aperez@igalia.com>
| * Add Cinnamon to the list of Gtk+-based DEsDmitry Shachnev2014-10-071-0/+1
| | | | | | | | | | Change-Id: I6c2a374026fde30858f1a51f34fa195ef8f8fe37 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * MSVC: Restore 'public' accessibility of QVariant member functions.Friedemann Kleint2014-10-071-1/+2
| | | | | | | | | | | | | | | | | | | | The were made 'protected' as a side effect of a change enabling support of template friends for MSVC. However, accessibility is part of the MSVC's name mangling and thus BC was broken. Task-number: QTBUG-41810 Change-Id: I5ce4c7010673c06d5b75219c89c7ebd337bac6c0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Clean up the CFTypes used in popuplateFamilyAndy Shaw2014-10-071-2/+2
| | | | | | | | | | Change-Id: Iabe127486c77ebb2afe7fe13ecccd70252a79031 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * Correct devicePixelRatio for software OpenGLMorten Johan Sørvig2014-10-071-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [NSView setWantsBestResulutionOpenGLSurface] is a hint and the driver may ignore it, for example when using software OpenGL on a virtual machine. In these cases devicePixelRatio() must return a value corresponding to the actual OpenGL surface size. Use [NSView convertSizeToBacking] which is one of the recommended methods. Task-number: QTBUG-41767 Change-Id: Ia79242219908a2454a83b44b6eb7463372764162 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Oswald Buddenhagen2014-10-0727-202/+361
| |\
| | * Merge remote-tracking branch 'origin/5.3' into 5.4Oswald Buddenhagen2014-10-0627-202/+361
| | |\ | | | | | | | | | | | | Change-Id: I132bb6cce68e9f8413200f7ee75586bd1cada38c
| | | * Doc: Clarify QBitArray::fill() documentationTopi Reinio2014-10-032-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a minor mistake in the the function parameter documentation, and add a code snippet. Task-number: QTBUG-39782 Change-Id: Ia5d88a983ad683ae5bde9f332d51adc4afda77a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| | | * QMacStyle: Fix QToolButton appearance on YosemiteTimur Pocheptsov2014-10-021-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Yosemite checkable toolbuttons look differently when highlighted - this modification tries to imitate such look without pixmaps we used on OS X >= 10.5 && < 10.10. Change-Id: I0fcdff42a67fa6d5188c9dc64401f0f27ae60b5d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| | | * Avoid naming clashes with QStringLiteral local variableKai Koehne2014-10-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MSVC 2013 complains about the use of 's' if a variable 's' is already defined in the context: error C2373: 's' : redefinition; different type modifiers error C3493: 's' cannot be implicitly captured because no default capture mode has been specified This looks like a compiler bug. Anyhow, it's easy to avoid the clash in most cases by using a more distinctive name ... Task-number: QTBUG-41706 Change-Id: Iaff1b6d37897fa8cf9e4913effa0498f9fd7bb07 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * wrap ALL_DEPS somewhat sanelyOswald Buddenhagen2014-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | otherwise we'll produce lines with tens of thousands columns when dealing with QMAKE_BUNDLE_DATA. Change-Id: Ia2a70f25e4ee1d3fe976027a7c46d234809a3f70 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * fix parallel installation of private and qpa headers in qt framework bundlesOswald Buddenhagen2014-10-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with qmake now de-duplicating the paths properly, we should version these QMAKE_BUNDLE_DATA entries as well, so we don't depend on the symlinking of the regular headers being done first. Change-Id: Idaa2ccc1ba9b5684b0c8d84f7f760735f54432e1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * fix Info.plist location in framework bundlesOswald Buddenhagen2014-10-011-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Apple's documentation [1], framework bundles don't have a 'Contents' folder. Instead, each version folder gets a 'Resources' folder which contains the Info.plist file, and which is also symlinked at the top-level framework folder. [1]: https://developer.apple.com/library/mac/documentation/macosx/conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html Task-number: QTBUG-32895 Change-Id: I5e55cc097b179012add0ceb7c567dace8e282895 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * don't try to create nested top-level bundle dir symlinksOswald Buddenhagen2014-10-011-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the target path may have multiple components, e.g. Headers/private. obviously, only the first component must be linked in such cases. Task-number: QTBUG-32895 Change-Id: If632b3b72c170a9fde36e62c165e06ded53deda3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * de-duplicate top-level bundle symlink creationOswald Buddenhagen2014-10-011-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | multiple QMAKE_BUNDLE_DATA entries can install into the same directory, but it obviously makes no sense to symlink that repeatedly. Change-Id: If65f7acdf4e158e33511917a027a380e642e2f28 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * redo bundle file dependency trackingOswald Buddenhagen2014-10-012-43/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of duplicating the plist/icon/bundled_files logic just to obtain the dependencies, create them as a side effect of the actual target creation. Change-Id: I6a0fe26c82c490b1040a7a06d5d0e7a4567ae1af Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * fix omission of QMAKE_PKGINFO from sliced bundlesOswald Buddenhagen2014-10-011-0/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Iff2c6686eae47e09fa6d046c60523aaf79aadfd5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * Add CFBundleVersion to the Info.plist files.Morten Johan Sørvig2014-10-0110-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add @FULL_VERSION@ -> Qt version substitution to unixmake2. This makes the Qt-generated Info.plist files compliant with the bundle signing/validation process. Task-number: QTBUG-32896 Change-Id: I1818f028c2f740d699629dd78cc0fe6ffaf94a1c Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * Don't make Info.plist for debug framework bundlesGabriel de Dietrich2014-10-012-57/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do so by setting a 'no_plist' config property. Can be overridden with 'force_debug_plist'. The debug version of Info.plist would overwrite the release version, and it also happens to contain invalid data. In particular, CFBundleExecutable would contain the _debug suffixed libname, which it shouldn't. See the entry about CFBundleExecutable on https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html Task-number: QTBUG-32894 Change-Id: Ideb018e4768a7c4e276e1b07d77937451f6db6a2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * centralize bundle_dir calculationOswald Buddenhagen2014-10-011-4/+4
| | | | | | | | | | | | | | | | | | | | Change-Id: I353fb4eafc014bccdec71af42f8625b33488ae0d Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * nest bundle-related conditionals for clarityOswald Buddenhagen2014-10-011-19/+20
| | | | | | | | | | | | | | | | | | | | Change-Id: I97f9d87cb5a114bf4764f13f0fd0d22e9b4da96f Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * make top-level symlinks in bundles point to Current, not the major versionOswald Buddenhagen2014-10-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current already points to the major version, and the other symlinks are supposed to take advantage of that (so a hypothetical change of major versions requires just one symlink to be adjusted). https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html Task-number: QTBUG-32895 Change-Id: I3c3a38c72ba18de6e48b20f2662341672022a274 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * write 'all' target laterOswald Buddenhagen2014-10-011-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | this allows us to extend its dependencies, which we will make use of later. Change-Id: I8809bdffb435455338e88e97049b10beeab0468a Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * actually use DIRLIST_SEPARATOROswald Buddenhagen2014-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it's QMAKE_DIRLIST_SEP and DIRLIST_SEPARATOR. pure evil. Task-number: QTBUG-41668 Change-Id: Ie2f6db6530e0f50bc1ce5db593180e7ad703766b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| | | * Accessibility: Fix crash with invalid QAccessibleInterfaceDyami Caliri2014-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows accessibility can crash if it handles an event with an invalid QAccessibleInterface pointer (one whose object has been deleted). Task-number: QTBUG-41597 Change-Id: Iba099f7cb732fd00f18f04bd951c6cdd94785871 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| | | * QPlainTextEdit: Fix crash on complex undo w/full width selectionEskil Abrahamsen Blomfeldt2014-09-302-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Say you have a document of two blocks of text. When you select a block of text in the document and then replace this with a new empty block (by pressing enter) and then subsequently undo this action, the following three steps are performed as a chain of undo commands: 1. Remove the empty block at the beginning of the document 2. Insert a new empty block at the beginning of the document 3. Insert the text back into the first block Since a block is removed and inserted in the same go, both blocks require a relayout, since the accumulated change spans both blocks. However, in QPlainTextDocumentLayout we would only look at the max of either removed chars or added chars. This would match the text length of the first block at this point, so we would only relayout that block. However, since we are also removing characters, the actual accumulated change to the document is larger. We should relayout any block touched by the sum of the added and removed character counts. Missing this, the paint event would later query block.layout()->lineForTextPosition(0) which would give an invalid line despite the fact that the block.length() > 0. This caused a crash in the paint event when the full width selection was turned on. Note that the logic here was only recently updated to include the removed characters at all in the logic, by the SHA1: 2983cb9531d47e5826540ca79e3066a8ed0db30c. [ChangeLog][QPlainTextEdit] Fixed a crash when using full width selections and issuing a complex undo command chain which removes and inserts an empty block in one go. Task-number: QTBUG-36415 Change-Id: Iafe8a69e455e0c713a48714f10f0cace69c84f51 Reviewed-by: Axel Rasmussen <axel.rasmussen1@gmail.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | | * QMacStyle: Generalize Cocoa control renderingGabriel de Dietrich2014-09-292-51/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, we were restricted by the values of ThemeButtonKind, which consist mostly of buttons. We want to generalize to other kind of controls when the time arrives. Already, QPushButton with pull- down menu is not possible to get from that enum, while its easy to get from NSPopupButton. Task-number: QTBUG-40833 Change-Id: I244c42c42ab595f4790050eb15ade70443e155b2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * QCocoaMenu: Keep a reference to the containing menu itemGabriel de Dietrich2014-09-294-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the menu to tell its containing item the menu got deleted. This removes the need to reset the COCOA_MENU_ANCESTOR property value, which would crash since QCocoaMenuItem::m_menu would be a dangling pointer. Task-number: QTBUG-41587 Change-Id: Ia3408ef85cf823bfddbc2c41d6534e43bf14ed29 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * create_cmake: Fix mingw plugin pathTimothy Gu2014-09-291-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MinGW static libs use libfoo.a format, and not foo.lib. Change-Id: I899adca8ec0b1c8430f5b6c4f18ad0ea1dc6d398 Reviewed-by: Timothy Gu <timothygu99@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>