Commit Graph

9725 Commits

Author SHA1 Message Date
Oswald Buddenhagen
0fae8b50f7 simplify forwarding include() statement in default specs
Change-Id: Ie584491a5f0355ef3f4457d9b4b9734e6e8fdc47
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
04cd23428a resolve only one level of symlinks, and only for the default specs
otherwise we end up in the source tree, which is counterproductive.

Task-number: QTBUG-26869
Change-Id: Id44a94f827dc285c75b9b243c8ef6478e668e3ff
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
cc2cd0db5d fold m_qmakespecFull back into m_qmakespec
the original value is not used any more after the final resolution.

Change-Id: Icadc219f045a1bbfd20506c4c72c53d1fb352969
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
514cdee46f make 'make check' work with non-installed prefix builds
add the appropriate environment to the command lines

Change-Id: Ic9d3c60255be88f431213acd8c5e0ff55e014f5b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
aad3410864 factor out qtAddTargetEnv()
Change-Id: Ib0517da54da98de4b1f2ee7d80bee22316231091
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
4ac264117a remove pointless conditionals+branches
the surrounding TEMPLATE == vc* scope already implies vcproj, as dsp is
not supported any more.

Change-Id: I68363aca62e21135f42572040ccc7b189dcf32c8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
33e0d5c939 remove mentions of borland from project files
Change-Id: I3049b24ae287bee50aca1de06664a2309df69edf
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
523c90810d don't make the outputs depend on $$QMAKE_DUMPCPP
the variable can contain a complex command which would make a mess of
the makefile.
also, the tool doesn't change all that often, so it's not particularly
useful to depend on the binary.

Change-Id: I965d6555cb22bd6d5306b324f5cad0d747128e99
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
d0ba4f5386 remove now unnecessary indirections
qmake's new parser can deal with this much more readable code.

Change-Id: I772c9da4c9d049e2b332305f41496ed1196f60eb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-09-19 19:54:44 +02:00
Frederik Gladhorn
cae8951e30 Fix typo in docs.
Change-Id: Icfafa00062b442903579dd7993c75fffb60187f9
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2012-09-19 19:54:44 +02:00
Tilman Sauerbeck
eb5b23748b Make QStatusBar text available via accessibility.
UNTESTED cause the build fails for me (unrelated to this patch).

Change-Id: Ie6836596b6fbaf93baa21d7008509774f1379f5c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2012-09-19 19:54:44 +02:00
Samuel Rødal
727c55c094 Fixed potential use of uninitialized variable in qgl.cpp
If glGetBooleanv fails this variable is left uninitialized.

Task-number: QTBUG-26952
Change-Id: Idb42833f2907bb66fd87c5cdb39753fca04e7438
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-09-19 19:54:44 +02:00
Thiago Macieira
d626bea2c7 Split the qt_message_output function in two
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>
2012-09-19 19:54:44 +02:00
Marc Mutz
a67ab0decd QFileInfoGatherer: remove unused members userId/groupId
None of the code references these, so remove.

Change-Id: Ie48d30b49c644f093df9f42c8d087751c4e980ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-19 19:54:44 +02:00
Marc Mutz
6d9d2c4fa8 QFileInfoGatherer: fix race conditions pt.1: abort
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>
2012-09-19 19:54:44 +02:00
Mitch Curtis
63bc298fb3 Pass correct argument to QShortcutEvent ctor in tst_qabstractbutton.cpp
The QShortcutEvent constructor takes "int shortcutId" as its second
argument, not a bool. Since the default shortcutId is 0, this test
passed, since false == 0.

Change-Id: I43bbae4613f3badb1578dccec76dcdd3c96a3a2f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-19 19:54:44 +02:00
Marc Mutz
ed116aa3b3 QVarLengthArray: provide STL-compatible member function names
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>
2012-09-19 19:54:44 +02:00
Sean Harmer
77fc6d30f1 OpenGL: Make use of the requested version and profile in QGLWidget
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>
2012-09-19 16:16:38 +02:00
Sean Harmer
c45005a778 OpenGL: Add flags and logic for newer versions of OpenGL in QGLFormat
Change-Id: Iad57286c36c7fd205f06abc40cca5f568d572e81
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-09-19 16:16:20 +02:00
Sean Harmer
7aaf293b35 OpenGL: Request latest GL version when using QGLTemporaryContext
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>
2012-09-19 16:16:13 +02:00
Giuseppe D'Angelo
d95d5bfd07 Make QTimer::singleShot take a pointer-to-const QObject
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>
2012-09-19 16:13:39 +02:00
Giuseppe D'Angelo
8e3e34defd Remove qUpperBound usages from qtbase
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>
2012-09-19 16:12:33 +02:00
Giuseppe D'Angelo
1e37d854f7 Remove qLowerBound usages from qtbase
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>
2012-09-19 16:12:30 +02:00
Kai Koehne
21d3445243 configure.exe: Improve help output
Add line breaks where it's looking awkward in cmd.exe , and new lines
where needed. Also adapt some descriptions to the configure shell script
output.

Change-Id: Ie784e715f51f7ff692ee85f7c960dc4583b65b23
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-19 16:12:17 +02:00
Kai Koehne
c7db21e81f Fix configure.exe output
Fix help output for -no-fontconfig, introduced in commit 1838a6c2.

Change-Id: I686000d51c56fde56179dcebef31b0783c0dfc29
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-19 16:12:10 +02:00
Sergio Ahumada
838e87b825 sql: Include own headers first
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>
2012-09-19 15:42:29 +02:00
Geir Vattekar
8347d4e0bd Doc: Use QStyledItemDelegate and frameless spinboxes in spinbox delegate example
Task-number: QTBUG-18847
Change-Id: I5347a1028b6f45a60e43fb75f6d362efecb6880b
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Marius Bugge Monsen <marius@cutehacks.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
2012-09-18 20:59:03 +02:00
Gabriel de Dietrich
ab1f00f6cd Fix tab navigation in windowflags example
Change-Id: Ia0e3087ea60262546cd1a21614591ad3626469d3
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-09-18 17:39:50 +02:00
Gabriel de Dietrich
b1893f7c49 Introducing NoDropShadowWindowHint window flag
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>
2012-09-18 17:39:50 +02:00
Oswald Buddenhagen
d92fd4ca54 fix non-bootstrapped $$system()'s line end conversions on windows
Change-Id: I026da1312bc28619dc7aa5974b7f4c00710517ac
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-18 17:39:50 +02:00
Kai Koehne
fdc64a445d Core: Fix gcc warning about signed/unsigned integer comparison
Fix warning: 'comparison between signed and unsigned integer expressions'

Change-Id: I5ce2857115137f9a06eddc74fda55ae49e37d345
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-18 17:39:50 +02:00
Kai Koehne
10e0e8afda Network: Fix mingw-gcc warning
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>
2012-09-18 17:39:50 +02:00
Kai Koehne
6368b2a751 Network: Fix gcc warning about qDebug format
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>
2012-09-18 17:39:50 +02:00
Jonathan Liu
4efd73bc3a QElapsedTimer: Fix typo in restart() documentation
Change-Id: Iac5df9edbe16ec841f783bc5266091a6e34e9cab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-18 17:39:50 +02:00
Miikka Heikkinen
ede4f5e23b Fix mapping to/from global coordinates for child/embedded windows.
QWidget's mapToGlobal() and mapFromGlobal() functions assumed that
if the widget reports it's a window or if it has no parent widget, it
must be a top level window whose coordinates are in global coordinates.
This is not true for child QWindows or embedded native windows
(QAxWidgets).

Changed the logic for mapping coordinates to use equivalent methods
from QWindow if widget has a window handle, and changed QWindow's
methods to map coordinates using native methods if window is embedded.

Also fixed newly failing accessibility autotest. The geometry related
failures there popped up because now the position of the rect returned
by accessible interface is actually correct while widget geometry still
reports position 0,0 before widget has shown up.

Task-number: QTBUG-26436
Change-Id: I658fafd0ce01eb1604ba255efeeba3073ca0189f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-09-18 14:52:38 +02:00
Shawn Rutledge
beab941e1f X11 (xcb) support for QScreen-per-output and runtime changes
QScreen has notifiers for its properties, but they were not being
emitted when one changes the resolution or arrangement of individual
outputs, e.g. via xrandr.  Also there should be one QScreen per
"output", e.g. laptop LCD + external monitor means 2 QScreens
which will be siblings, rather than just 1 QScreen to represent
the whole desktop.

Change-Id: Ia61bbc5e6a3506f813ab11f87c03d14cf7f4ce85
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-09-18 14:12:27 +02:00
Richard Moore
5ea896fbc6 Disable SSL compression by default.
Disable SSL compression by default since this appears to be the a likely
cause of the currently hyped CRIME attack.

Change-Id: I515fcc46f5199acf938e9e880a4345f2d405b2a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2012-09-18 14:12:17 +02:00
Thiago Macieira
3f970c20f9 Fix thread-safety of qt_ignore_sigpipe
The testAndSet operation would mean another thread could see the value
of 1 and proceed to write(2)/sendto(2) before SIGPIPE had been ignored.
If the pipe or socket were already closed by then, a SIGPIPE would be
delivered to the application with its default action: terminate.

Change-Id: I62dc8f5fa14c1dd453d13e4053c642bd78fbc468
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2012-09-18 14:11:53 +02:00
Oswald Buddenhagen
849f1f9efd don't allow overloading of built-in functions
the functions are not versioned or scoped, so user-defined overloads would
mess up qmake's own feature files. it seems safer to break user projects
than to allow the user to break qmake.

Change-Id: I020a2e6416bbb6e2fd2ece339629d848c00c8398
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-18 07:47:14 +02:00
Oswald Buddenhagen
c3c4f1eb53 remove the entirely insane whitespace compression
it was merely an artifact of using QString::simplified() on the
unparsed (!) project code. there is no reason why anyone should actually
rely on it, so just remove it.

Change-Id: If9b957c4b1263f3990a2331f8851bb1c06154ea8
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-18 07:47:05 +02:00
Yuchen Deng
2084b48a79 Build tools in release mode if using -debug-and-release option
Change-Id: I1d4b69e6954526b4f999e248f4f2cde6a9da26cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-18 07:45:12 +02:00
Samuel Rødal
70f3c78218 Prevent buffer overflow in QXcbWindow.
Thanks to Janne Kulmala for noticing this and informing about the fix.

Task-number: QTBUG-27123
Change-Id: Idd3cfd74fb7be277b6d805446aea5784b8fdf2f6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-18 03:34:08 +02:00
Jan-Arve Saether
a95ce12b91 Make qdoc read multiline macros in files with CRLF endings
This caused qdoc for instance to not being able to parse qglobal.h
correctly. (On windows, it stopped to parse anything meaningful after
the line with this macro:)

  #define Q_INIT_RESOURCE_EXTERN(name) \
      extern int QT_MANGLE_NAMESPACE(qInitResources_ ## name) ();

It worked on linux just because on linux a line continuation 'token' is
the sequence "\\\n" (on windows it is "\\\r\n")

So for files with CRLF line endings, it treated *only* the first line
as a macro, potentially causing the subsequent lines to affect the
state of the tokenizer.

Change-Id: If7c80ee7eb317f2d324ace7ff540ced7c31185dc
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-09-18 03:34:08 +02:00
Oswald Buddenhagen
1b569fe455 fix QMAKE_MANIFEST for shadow builds
Change-Id: Iea71f4a4d483e9465b3a7f0ce4560b2e9fa6cd63
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-18 00:59:08 +02:00
Oswald Buddenhagen
53ab67cdfe properly C-quote the manifest file name in the rc file
Change-Id: I8c8eb85d412becc8c4029c2aa393abf6f8e949b6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-18 00:59:08 +02:00
Oswald Buddenhagen
d113faefb8 rewrite *_manifest.rc unconditionally
the file has no dependency tracking, so changes to the source would get
missed and cause hard to debug build issues.
and as nothing does dependency tracking on that file, this change
doesn't even cause a noticable performance regression.

Change-Id: I108b490b71a43018e0c7ef5d7c0b11d79a8e726b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-18 00:59:08 +02:00
Oswald Buddenhagen
321687f03b factor out qtAddToolEnv()
so it's available for other users as well

Change-Id: I2d5a14ae427575c07321ac532b13ee03308b837f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-18 00:59:08 +02:00
Oswald Buddenhagen
fb8a6297f4 remove 3rd parameter from qtPrepareTool()
it's been superseded by the QTTOOL.* module stuff.

Change-Id: I01c9fc3ebbb22111bfb03f82693c7cf08b5fc9d4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-18 00:59:08 +02:00
John Peterson
8ca1c93a15 define QT_OPEN_LARGEFILE
it must be defined, even if zero

Task-number: QTBUG-27232
Change-Id: I950ef61ede197af9c2d8aedddd712cc6d4cc745b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-18 00:59:08 +02:00
Frederik Gladhorn
ca9d32faf4 Add Q_PRINTSUPPORT_EXPORT to qdoc ignores.
Change-Id: I0b8676a14133baf818ec12cda77dcb0670b5ee85
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-09-18 00:59:08 +02:00