Commit Graph

9725 Commits

Author SHA1 Message Date
Marc Mutz
15953e9503 QModelIndex: clean up integer size confusion in the API
QAIM::createIndex() took either int or quint32, but QMI::internalId()
returned qint64.

In the new interface, createIndex() takes, and internalId() provides,
integers of type quintptr.

This matches the storage size of the void* in the model index and
avoids truncation.

Remove the
  createIndex(int, int, quint32) and
  \obsolete createIndex(int,int,int)
overloads.

This makes a literal 0 in the third parameter ambiguous now.
The solutions have been noted in changes-5.0.0.

Change-Id: I0a0ecd8430eaf695129a4d09d14d4e30745485c4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-09-22 20:45:12 +02:00
Iikka Eklund
be15856f61 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-22 19:20:11 +02:00
Marc Mutz
a2d1cb87a0 QFlags: don't provide a constructor from void**
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>
2012-09-22 19:19:54 +02:00
Marc Mutz
7121bcca2d QDBusMetaTypeId: replace a volatile bool with an atomic int
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>
2012-09-22 19:19:41 +02:00
Marc Mutz
373a7277db QDBusMetaTypeId: don't cache the result of qMetaTypeId<>() in static ints
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>
2012-09-22 19:19:37 +02:00
José Millán Soto
f799e57151 Correct QSpiAccessibleBridge::setRootObject definition
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>
2012-09-22 19:03:16 +02:00
Mark Brand
3e78f84f4e configure: remove CONFIG features while getting PKG_CONFIG
When qmake is used to get PKG_CONFIG, core and gui are not
available. This motivates CONFIG-=qt. In fact, we don't need any
features for this job.

Change-Id: Id247054d43c50f6aeb62db7585c3e90f57aa36a1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-22 19:02:01 +02:00
J-P Nurmi
b72aa1cad3 QGtkStyle: remove an unnecessary sanity check for theme name
QGtkStyle was unable to detect the current GTK+ theme.

Change-Id: Ifd816e044bb8294f4ee2e3598ff53eb7cbce6064
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-09-22 00:47:40 +02:00
Konstantin Ritt
ceb9a8232c A step out from Harfbuzz (reduce dependency)
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>
2012-09-22 00:47:40 +02:00
Konstantin Ritt
ed5fe1b95e Fix build under MinGW after 1e3269c086
Change-Id: I3c8c28ba1016af6351afa5118893133d373cb4e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-09-22 00:47:40 +02:00
Caroline Chao
e3d334e7c3 Test: Update QSKIP message of tst_QVector::outOfMemory
This test is crashing. Specify the bug report number in the QSKIP
message.

Task-number: QTBUG-22343
Task-number: QTBUG-27285

Change-Id: I4d4ead4f54944a545103a3d01c5c9d302d7fb1df
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-22 00:47:40 +02:00
Caroline Chao
e7dccd9e03 Test: fix warning for tst_QPluginLoader::loadGarbage
Garbage libs (under elftest) are numbered from 1 to 5 and not from 0 to 4.

Change-Id: Ia0162372bf5cd1fb53a0442543c5a65716880611
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-22 00:47:40 +02:00
Samuel Rødal
ed8dec360c Fixed multiple modal windows from all blocking each other.
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>
2012-09-21 22:04:00 +02:00
Shawn Rutledge
f4c1ae6726 Added manual test for QScreen properties
Shows property values in fields which auto-update when the properties
change.

Change-Id: Ib97566a74cb8d0fff5f85bf97783e89dfb07481f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-09-21 22:03:53 +02:00
Sean Harmer
945d17b6e9 OpenGL: Add runtime check for OS X version and improve logic
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>
2012-09-21 21:44:43 +02:00
Frederik Gladhorn
1dc517abc6 Documentation fixes.
Change-Id: I2e234ec4307bbe39359cdfa8b13e86661dad43b6
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-09-21 19:59:55 +02:00
Frederik Gladhorn
eed5be6fcd Fix network doc links.
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>
2012-09-21 19:59:46 +02:00
Frederik Gladhorn
cf79da9933 Fix doc errors.
Change-Id: I9974d870c081620217582fcb6f8b146d208a471c
Reviewed-by: Peter Hartmann <phartmann@rim.com>
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
2012-09-21 19:59:34 +02:00
Frederik Gladhorn
d1f74b8ddf Move examples to proper location.
Change-Id: Ib808f5d99cb8217f8786411b531fa5bc7fa5250a
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-09-21 19:59:16 +02:00
Frederik Gladhorn
d16c565ca6 Move opengl/wid/net example docs to proper folders.
Change-Id: I846439a9cf7ad965ed27a00f98dbc4ff97abe73b
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-09-21 19:59:06 +02:00
Mitch Curtis
53373bdd9f Clarify valueChanged() signals' docs in QSpinBox and QDoubleSpinBox.
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>
2012-09-21 02:44:22 +02:00
Mitch Curtis
95cdcba91a Document that date/time formats without separators are unsupported.
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>
2012-09-21 02:44:22 +02:00
Jens Bache-Wiig
fe966e5f48 Fix regression in QAbstractScrollArea
The style hint SH_ScrollView_FrameOnlyAroundContents was currently
being ignored by QAbstractScrollArea. This looks like an accidental
regression following 10c6f015f4.

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>
2012-09-21 02:44:22 +02:00
Olivier Goffart
e92313bf7e Add comments to document the internals of QMutex
Change-Id: Ieb5632017e5e8e09a11dc6b929efa19b4f350086
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-21 02:44:22 +02:00
Marc Mutz
f4d47945ba Use QStringList::join(QChar) overload where applicable [qmake]
This is an automated change performing the following replacements:
                    join\("(.)"\) -> join('\1')
  join\(QLatin1String\("(.)"\)\)  -> join(QLatin1Char('\1'))
  join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1'))

Change-Id: I9c9964703dedfdab6e7bfac80be22bd5570e2e49
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-21 02:44:22 +02:00
Marc Mutz
cbf447069c qmake: add ProStringList::join(QChar)
Same reasoning as for 68e04c3ac1 applies.

Adding the overload was easier than to teach a Perl script to distinguish
between QStringList and ProStringList instances...

Change-Id: I6de6ecf21fdad135ac213b5c794927a9bc120a92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-21 02:44:22 +02:00
Oswald Buddenhagen
1f576cb6ab announce the android platform in the respective specs
Change-Id: I55c8d9fe4160c37eec6073894481e313e4dea191
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-21 02:44:22 +02:00
Oswald Buddenhagen
8a728b9a4a add missing maemo platform announcement to n9 spec
Change-Id: I24855dc3fdfcc19a81f7e030c9dfbbdddd2bb552
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-21 02:44:22 +02:00
Oswald Buddenhagen
773dd016c8 claim that mingw is a platform
it's mostly win32+gcc, but sometimes there are library differences, so it
makes sense to have an own platform flag for it.

Change-Id: I985f0dd39a47bfc16f10f4b4a9c168874ae2f20d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-21 02:44:22 +02:00
Oswald Buddenhagen
fff5a8f9c9 make qmakespecs announce the compiler family
on the way to eliminate scoping based on the spec.

gcc and msvc go as such into CONFIG, the other ones get the vendor
prefixed, as most are mostly unknown and thus likely to clash with
users' flags.

Change-Id: Ie622f53d90e96dbf05ce7d8c638cd355f04fa20c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-21 02:44:22 +02:00
Oswald Buddenhagen
38832db576 don't skip the configure.exe build even when it already exists
the build steps are now fast enough to make no-op rebuilds no problem.

Change-Id: I1018735bf50f3e7a66e22637237f26f98a3baf1d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-21 02:44:22 +02:00
Oswald Buddenhagen
c089f5e440 don't skip the syncqt call even when include/ exists
the syncqt run is now fast enough

Change-Id: Ie95a617fe99791ed38d02fe41578a0136fb68ddc
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-21 02:44:22 +02:00
Oswald Buddenhagen
098b817a97 don't set MODULE_BASE_OUTDIR unconditionally
webkit actually tries to set it, and after the syncqt invocation changes
we were breaking it.

Change-Id: I1ec740b7e96c972ca173f384529dde1fc7e7cc13
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-21 02:44:22 +02:00
Stephen Kelly
f4a8383a9a Replace QStyleOptionViewItemV? with QStyleOptionViewItem
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>
2012-09-21 02:44:22 +02:00
Oswald Buddenhagen
5ad378859a move syncqt call to qt_module_headers.prf
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>
2012-09-21 02:44:22 +02:00
Oswald Buddenhagen
0da7f09724 make error() abort the qmake run, not just the current file
Change-Id: I82fc55680f9ffb227e25acb39c797596225ba89e
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-21 02:44:22 +02:00
Samuel Rødal
b6acec1e5d Fixed outline / fill inconsistencies in raster paint engine.
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>
2012-09-20 23:08:55 +02:00
Samuel Rødal
72aaba336c Fixed inconsistent rounding of square cap pens.
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>
2012-09-20 23:08:44 +02:00
Laszlo Agocs
562d6ff90f Do not refer to non-existant member in QSurfaceFormat docs
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>
2012-09-20 07:04:11 +02:00
Laszlo Agocs
aac24582c6 Cocoa GL context: do not crash when closing windows
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>
2012-09-20 07:02:00 +02:00
Jan-Arve Saether
4b664eef64 Doc fix: Fix references to snippets and examples.
Did a recursive search under examples\widgets\doc

search criteria: "\snippet widgets/"
replaced with:   "\snippet "

Change-Id: I795580f8d207088df543edd9ef3b7b76c5e30d69
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
2012-09-20 07:01:48 +02:00
Andy Shaw
7432bb6bfb Load Mac specific resources when used in a static build
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>
2012-09-20 07:01:42 +02:00
Sergio Ahumada
c0bfb3d9b7 printsupport: Include own headers first
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>
2012-09-19 22:27:11 +02:00
Sergio Ahumada
57efe2f626 dbus: Include own headers first
cpp files should include their own headers first (but below config.h)

Change-Id: I4115604aee3211118e2ecf604067f3559dbb9f4c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-19 22:27:11 +02:00
Stephen Kelly
509ab6375e Remove casting of QStyleOptionViewItems to set data.
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>
2012-09-19 19:54:44 +02:00
Rafael Roquetto
89d9f8fe94 Rotate non maximized windows
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>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
2794b99bc6 make src/tools/ compile without CamelCase headers
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>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
eff0349102 don't require a fake qconfig.h for the configure bootstrap
Change-Id: I3d1224ad19b9e5278e35cf7c5142a29ccb589140
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
f104640fa5 syncqt only the QtCore headers for the bootstrap
Change-Id: I26e19805823bfe987c721f6a274803e54f0e4003
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
695051f3be move the module validation below the loading of sync.profile
otherwise the -module option will always die.

Change-Id: I023ea5681a03a2848e1084eedbbcc66f8d060b69
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00