summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QFlags: don't provide a constructor from void**Marc Mutz2012-09-221-1/+2
| | | | | | | | | | | | | | | | Use a pointer-to-member instead of void** for Zero, the type that is used to accept only a literal 0, but not other ints, as QFlags ctor arguments. This was developed while trying to find the cause for a build failure in the qCompare<QIcon> specialisation after adding underlying-enum detection to QFlags, and it didn't help, but I think it's a saver alternative to void**, in particular since the ctor in question is implicit. Change-Id: I71c67b0b50e9404e4e42836d09d62663296f58af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QDBusMetaTypeId: replace a volatile bool with an atomic intMarc Mutz2012-09-221-3/+3
| | | | | | | | | Since there is no non-atomic data that is protected by 'initialized' anymore, the read from, and the store to, 'initialized' may now have relaxed memory ordering. Change-Id: I58004e782d9fd93122efb31fa5b30ee160646d99 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusMetaTypeId: don't cache the result of qMetaTypeId<>() in static intsMarc Mutz2012-09-2212-59/+79
| | | | | | | | | | | | | | | | | | | | | | | | | There's not much point in caching the result of qMetaTypeId<>, because it's already internally memoised. In addition, the code that initialised the static int caches wasn't protected against concurrent access under the assumption that the operations performed were thread-safe. That is true for most of them, but not for the stores to the static ints, which race against each other: // Thread A // Thread B r1 = initialized /*=false*/ r1 = initialized /*=false*/ r2 = qMetaTypeId<...>(); r2 = qMetaTypeId<...>(); message = r2; message = r2; // race, ditto for all other ints To fix, turn the ints into inline functions that just call the respective qMetaTypeId<>() function. Change-Id: I5aa80c624872c3867232abc26ffdcde70cd54022 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Correct QSpiAccessibleBridge::setRootObject definitionJosé Millán Soto2012-09-222-5/+3
| | | | | | | | | | | | | QSpiAccessibleBridge::setRootObject was defined to require a QAccessibleInterface* as parameter instead of QObject*, as a result of that, QSpiAccessibleBridge::setRootObject did not reimplement QPlatformAccessibility::setRootObject and the adaptor was not initialized. After this change, applications should work with screen readers. Change-Id: Iee3d39f8e0959c1d75b1e682847d266a723c141b Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* QGtkStyle: remove an unnecessary sanity check for theme nameJ-P Nurmi2012-09-221-4/+1
| | | | | | | QGtkStyle was unable to detect the current GTK+ theme. Change-Id: Ifd816e044bb8294f4ee2e3598ff53eb7cbce6064 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* A step out from Harfbuzz (reduce dependency)Konstantin Ritt2012-09-2214-160/+171
| | | | | | | | | | | | | | | | | Introduce QCharAttributes and use it instead of HB_CharAttributes everywhere in Qt (in Harfbuzz, the HB_CharAttributes is only used in the text segmentation algorithm which has been moved from HB to Qt (well, most of it)). Rename some members to better reflect their meaning, remember to keep HB_CharAttributes in sync with QCharAttributes. Also replace HB_ScriptItem with a (temporary) QUnicodeTools::ScriptItem struct that will be replaced with a more efficient/friendly solution a bit later. The soft hyphen and the mandatory break detection has been factored out of the default text breaking algorithm to a higher level in order to refactor the QCharAttributes bitfields and to optimize the implementation for the common case. Change-Id: Ieb365623ae954430f1c8b2dfcd65c82973143eec Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix build under MinGW after 1e3269c0863bfac26be9e9239b6427ea77c6175bKonstantin Ritt2012-09-221-0/+2
| | | | | | Change-Id: I3c8c28ba1016af6351afa5118893133d373cb4e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Fixed multiple modal windows from all blocking each other.Samuel Rødal2012-09-211-0/+2
| | | | | | | | | | | | A modal window in front in the modal window list should never be blocked by a modal window further back in the list. This was taken care of in QGuiApplicationPrivate::isWindowBlocked(), we just need to make sure it gets called when a new modal window gets shown so that its blocked status is up to date. Task-number: QTBUG-27206 Change-Id: I590f1715e66067edb178081352636f34fe54a885 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* OpenGL: Add runtime check for OS X version and improve logicSean Harmer2012-09-211-4/+9
| | | | | | | | | | | | | Apple recommend adding NSOpenGLProfileVersion3_2Core when asking for a 3.2 Core profile context and NSOpenGLProfileVersionLegacy in all other cases. Also added a missing runtime check for OS X 10.7 or newer. Fixes a potential crash if Qt was built on 10.7/8 but executed on 10.6. Change-Id: I4c09d2dbbe8df25a3553cc01b468dabab0f8eaa4 Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Documentation fixes.Frederik Gladhorn2012-09-2112-126/+3
| | | | | Change-Id: I2e234ec4307bbe39359cdfa8b13e86661dad43b6 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix network doc links.Frederik Gladhorn2012-09-215-15/+16
| | | | | | | | Change-Id: I319644da80d91c5cf6d247410f022fbfd062a1f3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Fix doc errors.Frederik Gladhorn2012-09-212-2/+2
| | | | | | Change-Id: I9974d870c081620217582fcb6f8b146d208a471c Reviewed-by: Peter Hartmann <phartmann@rim.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
* Move examples to proper location.Frederik Gladhorn2012-09-211-0/+43
| | | | | Change-Id: Ib808f5d99cb8217f8786411b531fa5bc7fa5250a Reviewed-by: Martin Smith <martin.smith@digia.com>
* Move opengl/wid/net example docs to proper folders.Frederik Gladhorn2012-09-217-2029/+17
| | | | | | Change-Id: I846439a9cf7ad965ed27a00f98dbc4ff97abe73b Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* Clarify valueChanged() signals' docs in QSpinBox and QDoubleSpinBox.Mitch Curtis2012-09-211-12/+15
| | | | | | | | | | | | Explicitly mention that two signals are emitted and that the QString overload does include prefix() and suffix(). Task-number: QTBUG-26190 Change-Id: I90435779dcb2e4aa494c4b1b6e73e7f69d7998a4 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Geir Vattekar <geir.vattekar@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Document that date/time formats without separators are unsupported.Mitch Curtis2012-09-211-3/+3
| | | | | | | | | | The code is not handling formats like "HHmm ss" correctly, so it needs to be documented until such support is provided. Task-number: QTBUG-26067 QTBUG-26596 Change-Id: Ia456d8020e3e0aa9422e6e6987ac984f308facf9 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix regression in QAbstractScrollAreaJens Bache-Wiig2012-09-211-1/+1
| | | | | | | | | | | | | The style hint SH_ScrollView_FrameOnlyAroundContents was currently being ignored by QAbstractScrollArea. This looks like an accidental regression following 10c6f015f45092040c281bb90a65179f598a00b1. This code path does not execute on mac so it should have no impact on that patch. Change-Id: I78ca0a6b87dfdd7d426acbb3ef49480390211af2 Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Add comments to document the internals of QMutexOlivier Goffart2012-09-212-4/+54
| | | | | Change-Id: Ieb5632017e5e8e09a11dc6b929efa19b4f350086 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace QStyleOptionViewItemV? with QStyleOptionViewItemStephen Kelly2012-09-2121-225/+212
| | | | | | | | | | The former are a typedef for the latter in Qt 5. This only touches internal implementation, as the API was migrated long ago. Change-Id: Ided73021ebecc00508e6325c3d988b6c6ad336cd Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* move syncqt call to qt_module_headers.prfOswald Buddenhagen2012-09-211-0/+13
| | | | | | | | | | | | | for one, the syncqt invocation is qt module magic and thus simply does not belong into the generic default_pre file. second, this way the forwarding header generation is now linked to the rest of the build magic for a particular module, which is way less confusing for the unsuspecting developer. Change-Id: Idc8e420d3faf173d7fff4a41e6e1c59af15c3023 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fixed outline / fill inconsistencies in raster paint engine.Samuel Rødal2012-09-203-20/+2
| | | | | | | | | | We did coordinate rounding of the fill in the raster paint engine to match how drawLine_midpoint_i rendered lines. With the new cosmetic stroker in 4.8 this rounding is not needed anymore. Task-number: QTBUG-26013 Change-Id: Ibe86fa809276c8e7988d393a67e772d57b9a4799 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fixed inconsistent rounding of square cap pens.Samuel Rødal2012-09-201-10/+10
| | | | | | | | | | | A horizontal line should round up at the same time as a vertical line with square cap, when rendering at subpixel coordinates. Thus, the special casing in the cosmetic stroker of offsetting by half a pixel should be for flat caps instead of for square caps. Task-number: QTBUG-26013 Change-Id: Ic09249337f814c7de95a17976ec9e651561a744b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Do not refer to non-existant member in QSurfaceFormat docsLaszlo Agocs2012-09-201-2/+2
| | | | | | | | | | Sample buffers should be enabled automatically under the hood when samples is > 0 and therefore the getter and setter are gone. Change-Id: I9cd6438e89060f901598a6aacacb99362fac4718 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Cocoa GL context: do not crash when closing windowsLaszlo Agocs2012-09-201-2/+2
| | | | | | | | | Running hellowindow and closing its windows one by one would result in crashes without the additional checks for the presence of the underlying native window. Change-Id: Id32bdfda9a77936380b2e9a95fb56ceb52028d9d Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Load Mac specific resources when used in a static buildAndy Shaw2012-09-201-0/+7
| | | | | | | | | When Qt was built statically then the Mac specific resources were not being loaded which meant some style specific images were not used. Task-number: QTBUG-25391 Change-Id: If311148df19a87b6c8104553b662e3bf157f5717 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* printsupport: Include own headers firstSergio Ahumada2012-09-192-2/+4
| | | | | | | | cpp files should include their own headers first (but below config.h) Change-Id: I32a2c76a39d03f543c3eb8393b5e3015276f0622 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Sergey Hambardzumyan <sergey.hambardzumyan@digia.com>
* dbus: Include own headers firstSergio Ahumada2012-09-197-8/+10
| | | | | | | cpp files should include their own headers first (but below config.h) Change-Id: I4115604aee3211118e2ecf604067f3559dbb9f4c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove casting of QStyleOptionViewItems to set data.Stephen Kelly2012-09-191-8/+1
| | | | | | | | The correct values are already set inside setOptions, because the multiple versions of QStyleOptionViewItem were squashed in Qt 5. Change-Id: If0faf4b35bbf476e00905905376868814b8b095a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Rotate non maximized windowsRafael Roquetto2012-09-192-1/+114
| | | | | | | | | | | | | | There are two types of rotation to be considered: 1. Rotation of native widgets The corresponding window should be rotated and resized proportionally to the new screen geometry. 2. Rotation of toplevel windows. The window will be only rotated. It will be only moved or resized if it becomes clipped, in order to be fitted on the screen properly. Change-Id: Ice92427ac07a9bea284e68917ff3e0f436722bc0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* make src/tools/ compile without CamelCase headersOswald Buddenhagen2012-09-1971-200/+197
| | | | | | | | so the build works with syncqt -minimal Change-Id: Ief5e8eb9a504dd6c84cff76cc3e5257450386a0f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* don't require a fake qconfig.h for the configure bootstrapOswald Buddenhagen2012-09-191-1/+1
| | | | | Change-Id: I3d1224ad19b9e5278e35cf7c5142a29ccb589140 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove mentions of borland from project filesOswald Buddenhagen2012-09-196-13/+4
| | | | | Change-Id: I3049b24ae287bee50aca1de06664a2309df69edf Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix typo in docs.Frederik Gladhorn2012-09-191-1/+1
| | | | | Change-Id: Icfafa00062b442903579dd7993c75fffb60187f9 Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Make QStatusBar text available via accessibility.Tilman Sauerbeck2012-09-193-1/+18
| | | | | | | UNTESTED cause the build fails for me (unrelated to this patch). Change-Id: Ie6836596b6fbaf93baa21d7008509774f1379f5c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fixed potential use of uninitialized variable in qgl.cppSamuel Rødal2012-09-191-1/+1
| | | | | | | | If glGetBooleanv fails this variable is left uninitialized. Task-number: QTBUG-26952 Change-Id: Idb42833f2907bb66fd87c5cdb39753fca04e7438 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Split the qt_message_output function in twoThiago Macieira2012-09-191-31/+74
| | | | | | | | This way, I can ensure that the noreturn qFatal function calls a noreturn function as its last action. Change-Id: I6db7aa2539af430414645f386d7fce87cdb97186 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* QFileInfoGatherer: remove unused members userId/groupIdMarc Mutz2012-09-192-7/+0
| | | | | | | None of the code references these, so remove. Change-Id: Ie48d30b49c644f093df9f42c8d087751c4e980ba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFileInfoGatherer: fix race conditions pt.1: abortMarc Mutz2012-09-192-24/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a race on the 'abort' variable. While there was a mutex lock around the code that sets the variable in ~QFileInfoGatherer, there was no protection in getFileInfos(), where it is read: // T:this->thread() // T:*this // in getFileInfos(), after last mutex.unlock() mutex.lock(); abort = true; while (!abort... // ... // ... Fix by making 'abort' an atomic. This means that we can drop the mutex locker in the destructor, too. We still mostly access 'abort' under protection of the mutex, because we need to protect other variables that just happen to be accessed together with 'abort', but we avoid the mutex lock/unlock on each iteration of the while loop in getFileInfos(). Also cleaned up the logic in run(): - by using the canonical form of condition.wait() (in a loop that checks the condition), we can ensure that !path.isEmpty() and avoid having to use the updateFiles boolean. - by checking for abort.load() after we return from condition.wait(), we minimise the waiting time for thread exit. - by using different local names, we avoid having to this->qualify members. Also changed one condition.wakeOne() to wakeAll() for consistency with fetchExtendedInformation(). Change-Id: If35f338fe774546616ec287c1c37e2c32ed05f1a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QVarLengthArray: provide STL-compatible member function namesMarc Mutz2012-09-192-0/+50
| | | | | | | | | This allows, among other things, to use QVarLengthArray as the target of a std::back_insert_iterator. Change-Id: I507f612a23da854bf865780aa0a7e6312f4a896b Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* OpenGL: Make use of the requested version and profile in QGLWidgetSean Harmer2012-09-191-0/+3
| | | | | | | | | | When instatiating a QGLWidget in Qt5 at present it ignores the version and profile information in the QGLFormat meaning that we always end up with an OpenGL 2.x profile rather than what we asked for. This commit properly takes the version and profile into account. Change-Id: I097f10e397c23f5d97c5fcd8d5354667da286896 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* OpenGL: Add flags and logic for newer versions of OpenGL in QGLFormatSean Harmer2012-09-192-2/+29
| | | | | Change-Id: Iad57286c36c7fd205f06abc40cca5f568d572e81 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* OpenGL: Request latest GL version when using QGLTemporaryContextSean Harmer2012-09-191-0/+7
| | | | | | | | | | | This is necessary so that QGLFormat::openGLVersionFlags() returns the complete set of versions. Without this patch the temporary context ends up obtaining an OpenGL 2.x context as the QPA plugins now prefer to use the ARB {wgl,glx}CreateContextAttribsARB function which creates contexts of the specified version (2.0 for a default QSurfaceFormat). Change-Id: I2c3e02c9d7b77d4ee0484f9e8786f41675f8a439 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Make QTimer::singleShot take a pointer-to-const QObjectGiuseppe D'Angelo2012-09-192-7/+7
| | | | | | | | | | | The obvious idea is that a connect() happens behind the scenes. As QObject::connect takes a pointer-to-const, singleShot should do that as well. Change-Id: I36433c723441294b2088b23f0c37724ab43d9503 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove qUpperBound usages from qtbaseGiuseppe D'Angelo2012-09-198-11/+16
| | | | | | | | | Replace them with std::upper_bound; this allows for deprecation of qUpperBound. Change-Id: Idef01d2228b9a70eee3d52931d7aedb5bb6ba902 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Remove qLowerBound usages from qtbaseGiuseppe D'Angelo2012-09-1915-40/+67
| | | | | | | | | Replace them with std::lower_bound; this allows for deprecation of qLowerBound. Change-Id: I536e7338eb85ea6c7c1a5bf23121292767927e0b Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* sql: Include own headers firstSergio Ahumada2012-09-193-5/+5
| | | | | | | | cpp files should include their own headers first (but below config.h) Change-Id: I225bc0f09988167ae7f938f7f21a77d05a3d191b Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Introducing NoDropShadowWindowHint window flagGabriel de Dietrich2012-09-184-4/+14
| | | | | | | | | | Added suppport on QCocoaWindow. Also we deprecate WA_MacNoShadow since it isn't used anywhere, and updated the 'windowflags' example app. Change-Id: Id0b453ba15a23b768b0615838597bca139f507ad Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Core: Fix gcc warning about signed/unsigned integer comparisonKai Koehne2012-09-181-1/+1
| | | | | | | Fix warning: 'comparison between signed and unsigned integer expressions' Change-Id: I5ce2857115137f9a06eddc74fda55ae49e37d345 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Network: Fix mingw-gcc warningKai Koehne2012-09-181-1/+1
| | | | | | | | Fix warning: missing braces around initializer for 'BYTE [6] {aka unsigned char [6]}' Change-Id: Ic247ff0721955c4562ed027fad7cb3786809a840 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Network: Fix gcc warning about qDebug formatKai Koehne2012-09-181-1/+1
| | | | | | | | Fix gcc warnings: 'unknown conversion type character 'l' in format' , and 'too many arguments for format'. Change-Id: Ic7547a5bd5ba0d4c9f115004f250a0f7d3b378cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>