Commit Graph

24473 Commits

Author SHA1 Message Date
Friedemann Kleint
c067c012dc Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v).
Preparing the replacement of Q[TRY]_VERIFY(a == b) by
Q[TRY]_COMPARE(a, b) for non-boolean types.

Change-Id: Iab6ec2f0a89a3adc79e18304573994965013dab5
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2015-07-27 12:09:19 +00:00
Olivier Goffart
4c3c6bab30 QTimer: Force a compilation error with pmf without object
None of this should compile (foo is non-static):

  QTimer::singleShot(0, &TestObject::foo);
  QTimer::singleShot(0, SLOT(foo()));

Task-number: QTBUG-47426
Change-Id: I54b7d14124459e450c6a0a93a3033f21b57605d9
Reviewed-by: Dario Freddi <dario.freddi@ispirata.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-27 06:05:35 +00:00
Takao Fujiwara
a1bfa39651 Use ibus ProcessKeyEvent asynchronously.
ibus-hangul sends "CommitText" dbus asynchronous API during
"ProcessKeyEvent" dbus API is called. If "ProcessKeyEvent" is
synchronous, "ProcessKeyEvent" finishes before "CommitText"
finishes and the order of Hangul characters and space is not correct.

Task-number: QTBUG-40541
Change-Id: Ia526bc11833853082205ef1c3d64cf7943e2274f
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-07-25 20:44:53 +00:00
Friedemann Kleint
424e6386c6 tests/auto/opengl: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0)  by
          Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by  Q[TRY]_COMPARE(a, b) and
  add casts where necessary. The values will then be logged
  should a test fail.

Change-Id: I7add5b7afeba83895acdcbed110e8275dc76864a
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-07-24 21:23:34 +00:00
Venugopal Shivashankar
831c557cc5 qdoc: Improve customization of generated html file names
Introduce 'outputsuffixes' QDoc configuration variable, which
allows defining a module name suffix inserted into the
generated html file names. The suffix can currently be applied
to QML and JS documentation.

This is useful in cases where we have multiple versions
of a module as part of the documentation build, and
writing to a common output directory would otherwise result
in file name clashes.

Change-Id: I1437874fad09f041e506b93b62b6a4a8cae49ec9
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-24 10:36:24 +00:00
Topi Reinio
7a85be3371 qdoc: Improve searching of collection nodes
QDocDatabase provided a way to search for a collection node in
the primary tree only. This was insufficient for use cases where
we want to list groups, C++ classes or QML types in other modules
using the \generatelist or \annotatedlist commands.

This commit does the following changes:
    - Add a function to find a collection node across all
      trees, use it for generating output for the list commands
      and generating C++ class/QML/JS type requisite tables.
    - Modify the code for \generatelist command to accept
      'qmltypesbymodule' and 'jstypesbymodule' as parameters.
    - Modify constness of some functions to enable above
      changes.

Change-Id: I3dbdadfd224754db4bdc1602a5ffab9d46c51f00
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-24 10:36:03 +00:00
Paul Olav Tvete
80dbdf0de3 Make the gles3 example more impressive
Add some extra rotations and offsets, to show off the power of
what you can do with a single draw call. Also use QGLWindow instead
of QGLWidget. This improves performance from 23 FPS to 30 FPS on a
4k monitor with integrated Intel graphics.

Change-Id: Iedac1c14cc6057959aa15faaacdf29da91f36ab1
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-07-24 10:18:16 +00:00
Lars Knoll
906ad92fbf Some further optimizations in the qdoc code
Replace a lot of c strings with QLatin1String to avoid
utf conversions. Make one constant data structure static to
avoid it being recreated the whole time, and optimize our
tag replacement code.

Change-Id: I6513f3c70781a1bac658cbb3164c45d4cab36f57
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-24 08:51:33 +00:00
Lars Knoll
57bd6e67f7 use Xml stream reader to read qdoc index files
We get rid of the last usage of QDom and the old
xml parser in our build tools, and it makes parsing
of index files a lot faster.

Change-Id: Iccf01a4a73cc74a77806470fb4c4625f5331a7be
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-24 08:51:28 +00:00
Lars Knoll
1945441986 Don't generate invalid XML
An attribute is not allowed twice in XML. So change the
associated-property attribute, so that it contains a list
of associated properties is required instead of listing them
a couple of times.

Change-Id: Ibfb21c1a1de5ed39cda2eb29ac318bdbbf0eab4e
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-24 08:51:25 +00:00
Lars Knoll
dbf4c6290f Optimize CppCodeMarker::addMarkUp further
This avoids a couple of more string/memory
allocations, giving another 5% speed gain
for qdoc --prepare.

Change-Id: I455f615bb4388d883dca5a8cd31bf50629db23e0
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-24 08:51:12 +00:00
Erik Verbruggen
5fd9fe02ff QStateMachine: add defaultTransition in QHistoryState
The history state had the limitation that it was hard (or impossible) to
use when more than one default state had to be entered. For example,
using it in a parallel state was impossible without ending up in an
infinite loop.

This patch changes the QHistoryState to only have an initial transition,
and the state selection algorithm is changed accordingly. It also brings
QStateMachine closer to the SCXML standard.

The existing defaultState is implemented on top of the
defaultTransition: when used, a new transition, with the default state as
its target, is set as the defaultTransition.

Task-number: QTBUG-46703
Change-Id: Ifbb44e4f0f26b72e365af4c94753e4483f9850e7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-07-23 13:29:46 +00:00
Marc Mutz
5329d739ee Fix qHash(QFontEngine::FaceId)
There were two problems:

1. qHash() hashed FaceId::uuid, but op== didn't use it for
   determining equality. Thus, x == y => qHash(x) == qHash(y)
   might be broken if fileName and uuid have an orthogonal
   component, if you excuse my vector analogy.

2. To hash fileName and uuid, it concatenated the two,
   causing a temporary QByteArray to be created just for
   hashing its contents. That prevented marking qHash()
   as nothrow.

Fix by using new QtPrivate::QHashCombine and adding
uuid to the list of fields compared in op==.

Change-Id: I49f2379d514d6d3669929e737562cf6de823127e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-07-23 08:48:25 +00:00
Milian Wolff
f6d5c21e3e moc: Make toExpand const, we do not modify it.
Change-Id: I7036ea7ee9e533670ebed425e6c4a8bb0063f751
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-23 08:23:23 +00:00
Laszlo Agocs
4535c7911d Expose GLES 3.0 and 3.1 functions
Using the approach we already do for some GLES 3.0 functions we can provide a cross-platform,
cross-GL-GLES wrapper for ES 3.0 and 3.1 functions too.

Applications only have to take extra care about the version requests (context version
and version directives in shader code), the rest of their code can stay the same across
desktop/mobile/embedded, even when ES 3 functions are used.

The new functions are placed to a new subclass which is placed between QOpenGLFunctions
and the internal QOpenGLExtensions. This is necessary because, unlike with QOpenGLFunctions,
there is no guarantee that these functions are always available in all configurations.

When running on desktop OpenGL, we resolve as usual. If the OpenGL version contains the
function in question, either in core or as an extension, it will all just work. This is
handy because it does not rely on 4.x extensions like GL_ARB_ESx_compatibility, and so
ES 3.0 functions will be functional on OpenGL 3.x systems too by just setting a 3.x version
number in the QSurfaceFormat.

We will no longer qFatal on broken systems where the driver returns a 3.0 or 3.1 context without
the corresponding functions present. Instead, we show a warning and gracefully fall back to
resolving as usual, via eglGetProcAddress or similar. For functions that are available in ES2 as
an extension this may just work fine.

Added also an example that runs identically both with OpenGL and OpenGL ES 3 and utilizes some
ES 3.0 features like instanced drawing.

[ChangeLog] Added QOpenGLExtraFunctions providing OpenGL ES 3.0 and 3.1 function wrappers in
a cross-platform manner.

Task-number: QTBUG-46161
Change-Id: I9f929eb61946c35c415b178c4d6ab2c1c958684e
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-07-23 07:59:07 +00:00
Erik Verbruggen
0cd34a0c39 StateMachine: remove initial state for parallel states.
A parallel state cannot have an initial state, as all children of the
parallel state will be entered. Setting such an initial state on a
QState marked as ParallelStates would already produce a warning and
ignore the initial state. Now any initial state that has been set before
changing the child-mode to ParallelStates will also produce a warning
and remove the previously set initial state.

Change-Id: Ie5fcd44b03516744f785f2d1880bf806918c44d4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-07-23 07:44:35 +00:00
Lars Knoll
67638d08b4 Optimize CppCodeMarker::addMarkUp()
This cuts away another 15% of the running time of
qdoc -prepare.

Change-Id: I81bc32fa191b73fad5d7bd27ff22ac845f83a9ce
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-23 07:43:20 +00:00
Lars Knoll
6508365c04 Skip loading of index files if we are running with --prepare
This makes generation of the index files 3 times as fast.

Change-Id: I89af86e54d932fa19330f36a33af6ed9ea81461d
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-23 07:43:17 +00:00
Erik Verbruggen
795476c41a QStateMachine: remove left-over method.
This method was probably there in older versions of the specification,
but it is no longer used now. The only caller was in
QStateMachinePrivate::setError, which has been changed to use the newer
methods.

Change-Id: Ic4961990d8d2c902676e63193d3f30ef427e6f0c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-07-23 07:36:38 +00:00
Marc Mutz
d348d40473 QColor: make nothrow move-assignable and -constructible
The move special members were inhibited by the presence of
user-defined copy ctor and assignment operator, which we
cannot remove since the class is exported.

Change-Id: I54fe6c28351fe69ca4b75066adb76ea07c959dfe
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-22 21:14:05 +00:00
Sérgio Martins
b549758c61 qvariant: Pass a couple of large types by const-ref in Qt6
sizeof is approx 100 bytes

Change-Id: Ibd5fb50674effee832ce4529d737c060c570ffa3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-07-22 21:13:30 +00:00
Sérgio Martins
e3d0ea7680 qjsonarray: Remove a copy-ctor in Qt6
Makes the class trivially-copyable

Change-Id: I5b8ebadf351b65344f7ee30f0e7211738fdf54e4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-07-22 21:13:24 +00:00
Marc Mutz
b1b3083dec qdoc: replace some inefficient QLists with QVector
The types are either too large or too small for QList, which
only has acceptable performance with movable types of size
= sizeof(void*).

Change-Id: I5a2354e9400baad44095f1eac18d76ef915f6545
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-22 21:13:17 +00:00
Marc Mutz
14dde164dc tools: mark some types movable/primitive
They are held in QList or QVector.

Change-Id: Ic0e379560e554e5cd3de4319e402ec1655e77874
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-22 21:13:13 +00:00
Marc Mutz
47e6ddb2c0 QSet/QQueue/QStack: remove docs for removed special member functions
Commit 5c44232122 removed
the functions, but not the docs.

Change-Id: If12ec8a268cf67c7a62ba4f523360e0c79ce63ca
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-22 21:13:08 +00:00
Marc Mutz
e7df7091ee QLocale: mark some private types movable/primitive
Because they are.

Change-Id: I7f0b595fed568becdc33d1705fc8d7e372ec0c9d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-22 21:13:03 +00:00
Marc Mutz
63c4f9bc36 doc: QTimeZone::OffsetDataList is a QVector, not a QList
Change-Id: Ib5eb635fe267b743b970714c99db8c0abc9ac2c8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-22 21:12:58 +00:00
Marc Mutz
c91b53f6fa QStringRef: make nothrow move-assign- and -constructible
The move special members were inhibited by the presence
of a non-trivial copy constructor/assignment operator
and destructor. Restore them.

While we're at it, move all the special member functions
we should not have defined into an #if QT_VERSION block.

Change-Id: I873a99bfefe03e0fb02676e3431fd51f8c8f0adc
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-22 21:12:49 +00:00
Marc Mutz
8f38e6fcda QRegExp: remove pointless QRegExpCharClass copy special member functions
They do exactly what the compiler-generated ones would do,
but their presence inhibits the move special member function
from being synthesized.

Change-Id: Ib2046dbcee3c21ac3b5087f41d19e2a4a3e0a54f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-22 21:12:45 +00:00
Marc Mutz
a83be780ae QXmlStreamAttribute: make nothrow move assignable and -constructible
Unfortunately, we cannot rely on Q_DECL_EQ_DEFAULT, so I
needed to code the special member functions by hand.

The 'reserved' field is pretty useless, since the
existing ctors didn't initialize it, but just in
case someone finds a way how to store information
in there, deal with the field in the usual way:
set to nullptr in the move ctor and swap in the
move assignment operator.

Change-Id: I15a5f61807cb67deb6e979d4f3e5a260384b20ab
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-22 21:12:41 +00:00
Marc Mutz
4cbc19d3dc QItemSelectionRange: make nothrow move-assignable and -constructible
The move special members were inhibited by the presence of
a user-defined copy ctor, which we cannot remove since the
class is exported.

Change-Id: I7118588b808387f2733d93216c8c3b117666bb9e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-22 21:12:37 +00:00
Marc Mutz
562c01d04e QItemSelectionRange: use ctor-init-list
Avoids default-constructing two QPersistentModelIndex
instances just to copy-assign to them.

Change-Id: I0f3e04e3d202f58905f74df44d37dba27911a927
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-07-22 21:12:32 +00:00
Marc Mutz
02affdb891 QItemSelectionRange: add nothrow member-swap
Change-Id: Ie550f4a66b3c623b0ec630c18f38bcd96f6bbc99
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-22 21:12:25 +00:00
Kavindra Palaraja
f8441c071f Clarified the documentation for QTextDocument::find.
QTextDocument::find has a behavior that is different from the typical
QRegExp/QRegularExpression behavior where finding a given expression is
always constrained by the paragraph (block), regardless of newline
characters in the expression.

Task-number: QTBUG-21785
Change-Id: Ia6a061c6feb5a19e6b8caa3d8009da5ca31ec422
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-07-22 20:20:12 +00:00
Friedemann Kleint
5f5db1c38b QTestLib: Add macros QTRY_VERIFY2_WITH_TIMEOUT(), QTRY_VERIFY2().
Add QTRY_VERIFY2_WITH_TIMEOUT() similar to QTRY_VERIFY_WITH_TIMEOUT()
except that QTRY_VERIFY2() is used below the loop and QTRY_VERIFY2()
based on it.

Add tests to cmptest.

[ChangeLog][QtTest] Added macros QTRY_VERIFY2_WITH_TIMEOUT(), QTRY_VERIFY2()
making it possible to output a message after the timeout has expired.

Change-Id: I587e24f3aeb73542dbf3ccb936a16f2e0806555f
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2015-07-22 19:32:39 +00:00
Milian Wolff
c05f2d04f2 Optimize moc: Preallocate space for list of arguments on the stack.
This removes the temporary QList allocations.

Change-Id: I1f255e94730202f719e0a97b9ab4a83e28b805c1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-22 15:25:41 +00:00
Friedemann Kleint
aa42a1a67e QTestLib/Windows: Try to obtain a stack trace on crash.
Add a helper class for resolving debug symbols by dynamically
loading dbghelp.dll and try to obtain a symbol at the exception
location and a stack trace by using CaptureStackBackTrace().

The output looks like:

A crash occurred in d:\dev\projects\crashingtest_5d\debug\tst_crashingtesttest.exe.

Exception address: 0x0000000052E2853A
Exception code   : 0xc0000005
Nearby symbol    : QString::length

Stack:
 #  1: windowsFaultHandler() - 0x00007FFE080CACD0
...
 #  8: QString::length() - 0x0000000052E28530

[ChangeLog][QtTest] A stack trace will be output on standard error
if a test crashes.

Task-number: QTBUG-47370
Change-Id: I7217e02ec7dc0c96132fe84d1a175d0bed9c5aaf
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-07-22 14:49:35 +00:00
Andrew Knight
eff4a29489 winrt: Fix build when INADDR_XXX macros are not defined
These macros are not defined unless a desktop or standalone SDK is
installed.

Change-Id: I4c600ddca5944cc5fde310e4fbe0866a7250d36b
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-07-22 06:44:00 +00:00
Friedemann Kleint
fa542b2ab6 Fix creation of QPlatformTheme on UNIX platforms.
On Ubuntu 14.04.1 LTS, a file /etc/profile.d/appmenu-qt5.sh appeared,
exporting QT_QPA_PLATFORMTHEME=appmenu-qt5 (application menu theme plugin).

This caused QGenericUnixTheme::createUnixTheme() to return an
instance of QGenericUnixTheme by theme name instead of the appropriate
QKdeTheme, QGnomeTheme.

Fix this by always appending the generic theme name to the list
of available themes and returning it only if the name matches.

Qt 5 applications will now appear correctly themed on Ubuntu,
including theme icons.

Change-Id: I68fcd80a620b74e2af73e938253dba9933816336
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-07-22 04:14:03 +00:00
Friedemann Kleint
0e72782363 Port examples/widgets/dialogs to new connection syntax.
Change-Id: Ife8a24b43db400909099765b43f016b4be4bd6ef
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-07-22 04:12:45 +00:00
Marc Mutz
852b1d7b9b QSharedPointer: make copy assignment from compatible shared pointer use copy-swap
... like all other assignment operators.

Removes the last user of internalCopy(). Removed.

Change-Id: I15f2cb3b7b26988dd3bc2f4475bc316480476993
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-21 21:10:43 +00:00
Eskil Abrahamsen Blomfeldt
2978163759 Windows: Include DirectWrite support by default if available
This will automatically add DirectWrite support if the required
headers are found. The note about platform support from the help
screen has also been removed, since Windows XP is not officially
supported. Applications that need to run on XP can still build
with -no-directwrite.

Also changed the configure test to be a proper compile test, since
cross-compiled builds for Windows CE may break otherwise.

Change-Id: I7fc7bfb25f2f86ced8a4d4c78a69527de0273707
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-07-21 08:21:34 +00:00
Björn Breitmeyer
e5b8c38530 Fixing Wec2013 qmake support for VS2013 SDKs.
SDKs generated from VS2013 use a different folder for
build settings than those generated from VS2012.
Check both folders, before rejecting a potential
SDK.

Change-Id: I5bee5cc3771352adaab07d39ebbc350618f6c573
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-07-21 07:53:35 +00:00
Bjoern Breitmeyer
d149b1c14e Wec2013 initial port.
Change-Id: Ib1dfdc5687e54daefd84982653967fe5eff8aab5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-07-21 07:53:25 +00:00
Vincas Dargis
c963c514ac Qt Test: Fix QCOMPARE message for signed and unsigned char.
QCOMPARE did not print "Actual" and "Expected" values for quint8
and qint8 variables when they where not equal. QTest::toString<T>()
lacked specializations for signed and unsigned char types, that are
actually distinct types from char.

Change-Id: Iae789885c474c56441da45065992d7ccf1bc9f5c
Task-number: QTBUG-45238
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2015-07-21 06:48:08 +00:00
Friedemann Kleint
bdbd26a3b7 Polish the widgets/mainwindows/mdi example.
- Introduce Qt 5 signals & slot syntax and remove the QSignalMapper
  used to map the triggered() signals of the per-MDI-child actions
  of the window menu to the activation slot by a functor to demonstrate
  the flexibility of the new connection syntax (the functor can
  in turn be replaced by a lambda expression once we have C++ 11).
- Merge MainWindow::createMenus()/createQToolBars()
  into MainWindow::createActions(), removing the need
  to store the actions as member variables.
  Use QMenu::addAction() for brevity.
- Use QIcon::fromTheme() to obtain system icons and use
  resource icons as fallback.
- Rewrite settings code to use
  QWidget::saveGeometry(), Widget::restoreGeometry() since
  saving size and position does not work well with multiple
  screens. Query the available size when determining
  the initial size instead of using hard-coded values
  for High-DPI screens.
- Fix minor issues in code, use multi-argument version
  of QString::arg(), QDir::toNativeSeparators() to
  present file paths to the user and static method invocation.

Change-Id: I3d5078ddbe3cb4eba65e188430ba3580cecb2c79
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-20 22:07:13 +00:00
Thiago Macieira
c4a97def7b Update/fix the qmake support for yacc
yacc.prf was mostly working, so this commit simply makes it slightly
better by using the -p and -b options that POSIX requires and avoid
having a common intermediate file.

Change-Id: Ib306f8f647014b399b87ffff13f1e8e74ad4db1d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-20 16:09:11 +00:00
Thiago Macieira
6636320867 Makes sure that yacc works with the MSYS bison on Windows.
Most people's yacc are actually a symlink to bison. On Windows, where
symlinks don't usually exist, we can use bison -y.

This was tested with MSYS Bison.

Change-Id: I913745d48af30f9ef7b846b6438500261dd6022d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-20 16:09:07 +00:00
Thiago Macieira
db2fc7843c QProcess: make setWorkingDirectory stop launch if the dir doesn't exist
[ChangeLog][QtCore][QProcess] Fixed a bug that caused QProcess to launch
a child process on Unix even if the directory specified with
setWorkingDirectory did not exist.

Task-number: QTBUG-47271
Change-Id: Ib306f8f647014b399b87ffff13f195158b0e52f5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-20 16:07:46 +00:00
Ulf Hermann
ee0fd87007 Selectively update library paths when creating QCoreApplication
We force a recreation of the library paths with added information on
construction of QCoreApplication. This way we can find plugins in
the application directory which only becomes known when
QCoreApplication is created. When the user changes the library path
we create a new list of the manually modified library paths and
recalculate it from the delta of original vs. modified paths when
QCoreApplication is created.

The upsides of this approach vs. keeping an explicit delta are:

* We don't need to introduce a separate data structure to hold
  the added/removed status for delta items or the information that
  the whole list got replaced.

* The lists never get larger than the the real library paths. An
  explicit delta would have to record all modifications.

* I don't think the delta replay algorithm we would have to do
  anyway could be made much more compact than the one this change
  introduces.

Of course, if the user actually changes anything, the list is
duplicated. Considering that this is a rarely used function and
that we would have to save some extra information anyway, I think
we can live with this.

Task-number: QTBUG-38598
Change-Id: I3bfbbd1be62dd5804dcc7ac808b053428a4e3149
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-20 15:57:07 +00:00