Commit Graph

15063 Commits

Author SHA1 Message Date
Stephen Kelly
db87c9ead2 Don't compare const_iterator with iterator.
Commit 93ffb81df6 introduced this bug. As
it is in the header, it affects downstreams.

Change-Id: I02e86927e648153ca7c0b66ac945a7f99cc4cd89
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-27 22:32:35 +02:00
Paul Olav Tvete
f3c019649b Test layout engine fundamentals
Done with Jan Arve

Task-number: QTBUG-33104

Change-Id: I8319748536d448d1c37a26527ced53156d8c2f56
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-08-27 22:00:48 +02:00
Oswald Buddenhagen
b7f7edfae4 de-duplicate code for writing dummy makefiles
as a side effect, this fixes the generators that were more bitrotted
(nmake and even more mingw).

Task-number: QTBUG-30644 #close
Change-Id: Iefa3f07125884412d091aa12b44935e5b1fb858a
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-27 19:12:06 +02:00
Leena Miettinen
ad4bda8b75 Doc: update Project Options section in qmake Manual
Explain which mkspecs have the configuration option
precompile_header set.

Task-number: QTBUG-25683

Change-Id: I9b11eafad16b65523cbb90897fe88829add58bea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-27 19:12:06 +02:00
Oswald Buddenhagen
59ee3e5db6 export QT_TOOL_ENV to the tool module pri file
fixes "make ts" in qttranslations in a non-installed prefix build.
amends 13e01fda1

Change-Id: I2547d825c1c71e42fdacab5edaace67247ef69e7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-27 19:12:06 +02:00
Friedemann Kleint
78d7192338 Close menu on 2nd click on QMenuBar.
Task-number: QTBUG-32807
Change-Id: I0c3c25c6acf92bc30c1bcfc09003209b572ec777
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-27 19:12:06 +02:00
Friedemann Kleint
5bb4817142 Center widgets using UpdateWidgets in tst_qwidget.
Try to stabilize doubleRepaint and others, try to get them away
from taskbar areas.

Change-Id: Icae8da575999afccb314edafd7deb16446e3d1c2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-27 19:12:06 +02:00
Peter Hartmann
2109965a4e QTcpSocket auto test: rely on IMAP port, not SMTP port
The new test server image will not have a SMTP service installed, and
the network self test does not check for that either.

Change-Id: I1063777832148e184de4ddf21d9154364f644e1e
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-08-27 19:12:06 +02:00
Peter Hartmann
5cb6260a36 QNetworkReply auto test: Skip tests failing due to Squid issues
This test works with no Qt version (4 or 5) when testing with the
Squid (HTTP proxy) version deployed on the new test server image.

Task-number: QTBUG-33180
Change-Id: If244526a4baed9f3836dade007fe0f15649a8f86
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-27 19:12:06 +02:00
Giuseppe D'Angelo
be72ea7e35 Do not attempt to save a file in the resources
A wrong code path caused the textedit example to attempting to try to
save the file it was currently editing even if it was loaded
from the resource system.

Task-number: QTBUG-33105
Change-Id: I9e03168968a98a421e8ab93a8d06f808b72ac3b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-08-27 19:12:06 +02:00
Konstantin Ritt
3aa163491c Add configure options for [experimental] HarfBuzz-NG support
Change-Id: I15f49b56f49ae53c16db904e03f668c3135edaa5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-27 18:05:08 +02:00
Konstantin Ritt
c88f1492c6 Fix help output for freetype and PCRE in windows configure app
Change-Id: I686a63a02a5544736c84bcdbe274275acabfbc3d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-27 18:05:03 +02:00
Konstantin Ritt
9e0cccde0a Refactor line breaks in windows configure app
As a side effect, this fixes wrong line break in "Third Party Libraries" section.

Change-Id: Ie6510fa94626a1c586621948a4681efdcf61f8b2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-27 18:05:00 +02:00
Konstantin Ritt
370ea08f77 Add freetype result info to unix configure output
Change-Id: I0393a593a721ec0cd7e7a2490e0fe0453f092934
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-27 18:04:55 +02:00
Konstantin Ritt
9ece604d9b Add stripped version of HarfBuzz-NG 0.9.19 sources to 3rdparty
Change-Id: I06fbf58131ebce51ce95921d8dfd65dd3d3e236f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-27 18:04:28 +02:00
Konstantin Ritt
79e77a58a6 Make it possible to build HarfBuzz-NG in Qt
Change-Id: Ib956adb0ab7bcfba3ce73acf7c19bda815d6eb73
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-27 18:04:23 +02:00
Sean Harmer
a70c0ad1d1 Add operator[] to QVectorND classes
Change-Id: Ia786d4fab64da974bb60f24c05325925d42a1e70
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-08-27 17:50:40 +02:00
Yoann Lopes
5971e09187 Use custom class for storing distance fields instead of QImage.
Distance fields are stored using a one-byte alpha component per pixel, a
format that QImage doesn't currently support. The Indexed8 format was used
instead, limiting what could be done with the QImage.
This patch introduces a new private class, QDistanceField, with a similar
API to QImage and using the Alpha8 pixel format. Unlike QImage which
aligns scanlines on a 4-byte boundary, QDistanceField tightly packs
scanlines together.

Task-number: QTBUG-30908
Task-number: QTBUG-32861
Change-Id: Ic273259ea07dfbd2b81a6358c0ca11a2330eb749
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-27 16:03:11 +02:00
Eskil Abrahamsen Blomfeldt
f3a53eae80 Revert "Fix compilation for Android ARMv5"
This reverts commit 9fa1bdeeb2 which
is no longer needed because the Android NDK now contains a
toolchain without the bug for which it was a work-around.

Task-number: QTBUG-31051
Change-Id: I601ba2fccb927ee7e818644de4474700e2eec8f1
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-08-27 16:00:47 +02:00
Oswald Buddenhagen
e0f2603f49 avoid deadlock in cache() during spec/cache loading
sync up; this doesn't actually do anything in qmake.

if we end up calling cache() from within the initialization of the base
context, we cannot wait for for the completion of that initialization
before we proceed, obviously.

Change-Id: If30c6f3665fe423e767373a8821c406b2f5e0eca
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/b64b4431c20afd9e39c1463e736f998ef450688f)
2013-08-27 13:36:34 +02:00
Oswald Buddenhagen
652bdb8894 lock baseEnv in cache()
sync up; this doesn't actually do anything in qmake.

as we modify the environment, it must be properly locked.
this implies that initFrom() also needs to be called with a lock.

Task-number: QTCREATORBUG-9835
Change-Id: I48bae9af9adaa0518e5a9db0ba08ff057ae14f9f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtcreator/d022a2d19cecb00397c2a215fc4e3bf64b1e627b)
2013-08-27 13:36:31 +02:00
Oswald Buddenhagen
957134dc84 always check for baseEnv init failure
sync up; this doesn't actually do anything in qmake.

creator's file watcher can trigger many parallel, entirely
non-hierarchical project reloads. if there is enough of them to exceed
the thread pool size, some will be serialized already by qtconcurrent,
not by our wait condition. these should notice a faulty spec, too.

Change-Id: I8ce40cb90fbc28045127881d57ec94e125df79af
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtcreator/759d0a69dd3973b4785b6f9412f46666a05cdf85)
2013-08-27 13:36:28 +02:00
Mitch Curtis
507f1889e2 Add QJsonValue::toInt().
It's a nice feature to have.

MSVC also complains about using doubles to create enum values, so
the ugly workaround is:

enumValue = MyEnum(qRound(json["myEnumValue"].toDouble()));

[ChangeLog][QtCore][QJsonValue]Added QJsonValue::toInt().

Change-Id: I1a200b912abf66b2e96390b1980caff26cfa2685
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-27 08:01:29 +02:00
Thorbjørn Martsum
f73518e732 QMessageBox - move informative+details text to new layout function
Controlling the layout from different functions is not easy, so
lets move it to the setupLayout function.

Change-Id: I3120a2e98b2f8425befa135595d4ad7ce1b8ca56
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-08-27 05:56:09 +02:00
Thiago Macieira
77e8ff66f0 Move the creation of QElapsedTimer out of the inner function in QMutex
Makes it possible for QElapsedTimer to be non-POD.

Change-Id: I5ffc59c7a93c187a4a814e6959f8383fa8d4cc44
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-08-27 03:51:31 +02:00
Thiago Macieira
a7ba0ad93e Make sure deprecation warnings don't cause errors with -Werror
It sounds like a good thing to have this warning, but for
future-proofing we can't have it. The system libraries might change
and add deprecation marks (OS X does that often). If they do that, we
don't want poor developers to have to fix all warnings before they can
build Qt again.

Change-Id: I4ff317da0de596c470bb1efe6e59bcf70aeec8fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-27 03:50:58 +02:00
Thiago Macieira
b0b5ade8d3 Don't try to detect the CPUID instruction if we're compiling for Pentium
If we're compiling for Pentium or better CPUs, then we know that the
CPUID instruction is present (I think it was introduced in late 486s,
actually). So don't try to detect it. Simply assume it's there and then
execute it.

This means that if you compile Qt for Pentium (or higher) and run it on
an i386 or i486, you'll get a SIGILL (or whatever your OS produces for
an #UD processor exception). If the CPU detection code even got run --
SIGILL might happen for any other instructions found along the way.

Change-Id: Iacd4a94a51363a609a61fc2bfd2e218fb290272d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-27 03:50:50 +02:00
Christian Strømme
ac611399fe JNI Convenience: Make single argument ctors explicit.
Change-Id: I330e4acf9b944fc72066b608653edd4686620b7e
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-08-26 23:52:59 +02:00
Christian Strømme
ca0ec4043f JNI Convenience: Print exceptions in debug mode.
The exception message might contain valuable information about what went
wrong, so we should print the message.

Change-Id: I50c986d4c18cf6115017fcc92363c946be45024d
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-08-26 23:52:40 +02:00
Christian Strømme
1db13907d9 JNI Convenience: Make it possible to copy QJNIObjects.
Change-Id: I692242147d5f908381ea9d3b393b3c591385efd4
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-08-26 23:52:27 +02:00
Christian Strømme
0ccb75b5fc JNI Convenience: Use isSameObject() when comparing jobjects.
Comparing the value of two jobjects are not safe, as it's not guaranteed
that two jobjects that is referencing the same object,
will have the same value. To make things worse two jobjects might have
the same value even though they reference two different objects...

Change-Id: I997ea8abfb8c687c342b261bba3848cbbd741633
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-08-26 23:52:15 +02:00
Eskil Abrahamsen Blomfeldt
fa8786c397 Android: Fix crash when hitting Back button to quit
On Android, it's possible to reach the condition when window == 0
if you hit the Back key, since the previous bail-out is disabled
for this case. To avoid a null-pointer dereference, an extra
check is required.

Change-Id: Ic898cd82dd6e52c24505dd2248c98efcefc15b1c
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-08-26 23:52:03 +02:00
Leena Miettinen
31e665c7cd Doc: update description of qmake SUBDIRS variable
You can specify a relative path to a .pro file in any directory.

Fixed a capitalization issue and a grammar issue and changed the
visible text in a link target.

Task-number: QTBUG-14139
Change-Id: Ib476bd400c46645709950c582492edcaaba9d7ed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-26 13:36:24 +02:00
Joerg Bornemann
788bde071a remove support for Qtopia's QOM_OBJECT macro
That's not been in use for quite a while.

Change-Id: If5a18a54d32f330fe37655516d4b83e5d3d30afc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-26 12:21:40 +02:00
Thorbjørn Lund Martsum
934f062203 QAIV - Fix scollbars with ScrollPerPixel to scroll 1 pixel.
The documentation says that we scroll one pixel

Quote:
"QAbstractItemView::ScrollPerPixel  (value 1)"
"The view will scroll the contents one pixel at a time."

However until now Qt has tried to be smarter than the
documentation, but is actually getting in the way of the user,
where a manual set value to setSingleStep will continuingly
be overwritten (on e.g resize).

This patch ensures the behavior described in the documentation
for the vertical headers - and leaves the control to the user.

[ChangeLog][QtWidgets][QAbstractItemView]  QTBUG-7232 - In ItemViews
scrollbars will now by default only scroll 1 pixel when scrollMode
is set to scrollPerPixel. That is it will (when scrollMode is
scrollPerPixel) do what is stated in the documentation, and no
longer automatically adjust the scrollbars singleStep. The user
can now control that value.

Task-number: QTBUG-7232

Change-Id: I8a61d3100be65d0c4ee32aad58caed019aa2669c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-26 09:40:59 +02:00
Martin Smith
94dca6d10c qdoc: Fixed the relative link to installdir problem
Instead of using the fake "outputdir" to force qdoc
to generate a relative path to the actual output dir,
it now uses the value of HTML.outputsubdir, or just
"html" if HTML.outputsubdir is not specified.

Task-number: QTBUG-32580
Change-Id: I45c79a788e102213e6d343a7ed108a3d17d94759
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-08-26 08:53:32 +02:00
David Faure
404598b613 Long live QCommandLineParser!
The QCommandLineParser class provides a means for handling the command line options.

QCoreApplication provides the command-line arguments as a simple list of strings.
QCommandLineParser provides the ability to define a set of options, parse the
command-line arguments, and store which options have actually been used, as
well as option values.

Done-with: Laszlo Papp <lpapp@kde.org>

Change-Id: Ic7bebc10b3f8d8dd06ad0f4bb897c51d566e3b7c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 21:33:39 +02:00
Thiago Macieira
1411a6f1ac Remove use of QFlag in the SQL drivers
It's not clear why they were added, but they aren't needed anymore.

Change-Id: I1d919deefdbd6a71fa255eeac1a8543c33ba390d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-24 17:41:38 +02:00
Thorbjørn Martsum
c35b55f076 QLinkedList - fix insert with iterator when the list is shared.
Before a call to erase on a shared instance would imply that the
item was inserted into the shared data (i.e all instances)

Change-Id: I655ccf04b1ad9bf82e6bfade58929538fa7df000
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 15:36:30 +02:00
Thorbjørn Martsum
97f867212f QList - fix insert with iterator on shared instance
This patch ensures correct detach when insert with an iterator is
called on a shared instance (i.e same behavior as QVector)

Change-Id: Id660eacd3cc7b633456dfa989997bbad747e1df2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 15:36:30 +02:00
Thorbjørn Martsum
ea25495703 QLinkedList - fix erase with iterator when the list is shared.
Before a call to erase on a shared instance would imply that the
item was removed from the shared data (i.e all instances)

This patch improves the behavior to detach and erase the item
specified by the iterator (i.e same behavior as QVector)

Change-Id: Ib3cfb5363c86b400886c80b75b0c20ca854ce801
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 15:36:30 +02:00
Thorbjørn Martsum
5fc13cc06a QList - fix QList::erase when the list is shared
Before calls to erase on a shared instance would in release mode
imply that items were removed from the shared data (i.e all instances).
In debug mode it would assert.

This patch improves the behavior to detach and erase items
specified by the iterator(s) (i.e same behavior as QVector)

Change-Id: I89b69446cb1ffd43a98402b7ab1ec9a59bceb8e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 15:36:30 +02:00
Thorbjørn Martsum
a5c7a9032e QMap - fix erase with iterator when the map is shared
Before a call to erase on a shared instance would imply that the
item was removed from the shared data (i.e all instances)

This patch improves the behavior to detach and erase the item
specified by the iterator (i.e same behavior as QVector)

Change-Id: Ia44db84fc1388d92308bf0d2b32539ac4d53850b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 15:36:30 +02:00
Thorbjørn Martsum
93ffb81df6 QHash/QSet - fix QHash::erase when the hash is shared
Before a call to erase on a shared instance would imply that the
item was removed from the shared data (i.e all instances)

This patch improves the behavior to detach and erase the item
specified by the iterator (i.e same behavior as QVector)

Since QSet uses QHash it improves QSet the same way.

Change-Id: I850b1efcf7bdfc85ceddb23128b048af95f75063
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 15:36:30 +02:00
David Faure
dacf9961da QThreadPool: fix counting of waiting threads
QTBUG-21051 has a testcase where activeThreadCount() could actually
end up at -1 (converted to an autotest in this commit).
The reason was: start() calls tryStart() which returns false due to
too many active threads (reserveThread() causes this), so it calls
enqueueTask() - which actually wakes up the waiting thread, but
it didn't decrement the number of waiting threads.

Note that tryStart() is "if I can grab a waiting thread, enqueue task and wake it"
while start(), in case tryStart() fails, wants to "enqueue, and then if I can grab
a waiting thread, wake it". This is why enqueue shouldn't wake; waking must happen
only if we can grab a thread (d->waitingThreads > 0).

Task-number: QTBUG-21051
Change-Id: I3d98337103031c9bdf0bf365295f245be0c66aa7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 13:09:46 +02:00
Thiago Macieira
64a1448d87 Update Linux interface getting to make fewer syscalls
Each time we call if_nametoindex, if_indextoname or somesuch, the libc
needs to open a socket, make an ioctl, and close the socket. Since we've
got most of the information we need anyway in the data from
getifaddrs(3), let's just use it

Change-Id: I572c212a27c4b9ffe57980b36f75bb04e6d5cf29
Reviewed-by: Jonas Gastal <gastal@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-08-24 00:06:07 +02:00
Thiago Macieira
362ea2dede Soft-deprecate obscure feature on property getters returning pointers
moc actually generates the right code for getters returning a pointer
to the type in question, or a reference to the type (a reference, one
would assume, does not require code changes). However, the same
extension is not valid for the setter: it can't receive the new value
by pointer.

Therefore, let's soft-deprecate the feature by removing its existence
from the documentation.

Task-number: QTBUG-33091
Change-Id: I27844213e051ec7fafeb4744089a0653aea6f1f3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-08-23 21:39:41 +02:00
Thiago Macieira
7c2a418857 Add unit test to ensure %3A in a path isn't decoded to ':'
QUrl("http%3A%2F%2Fexample.com") has only a path of
"http%3A%2F%2Fexample.com". In Qt 5.0 and 5.1, the %3A would get decoded
to ':', which in turn makes the URL invalid (colon before first slash).

Found via discussion on the interest mailing list.

Change-Id: I7f4f242b330df280e635eb97cce123e742aa1b10
Reviewed-by: David Faure <david.faure@kdab.com>
2013-08-23 21:39:23 +02:00
Thiago Macieira
043b809197 Set an upper range of compiler versions for -Werror
This allows us to go back to older versions of Qt with newer compilers,
that didn't exist when those versions were released. It also allows
someone upgrading their compiler and not being faced with having to fix
all warnings before Qt compiles.

This commit whitelists the following compilers:
* Apple Clang versions 4.0, 4.1 and 4.2 (OS X only)
* Intel Compiler versions 13.0, 13.1 and 14.0 (Linux only)
* GCC versions 4.6, 4.7 and 4.8 (all OS)

Notably, Clang on other other OS besides OS X and MSVC are missing.

Change-Id: I665160d40a59336da1904f2a6c1eda543e592b48
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-23 18:56:09 +02:00
Thiago Macieira
ca772b2f2f Ensure the docs for QOpenGLFunctions_ES2 are generated
qdoc runs the preprocessor, so it probably skipped the definition for
this class.

Change-Id: I10933134d0c20131dd25e15bee914ebfac358b10
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-08-23 18:39:53 +02:00