This is done by defining QMAKE_LFLAGS_RPATH for compilers for Apple platform.
Task-number: QTBUG-31814
Change-Id: I9040df341ad46395d6ab71bc760ba7a5ee5ff291
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Defaults qmake behavior is to make all project RPATHDIR paths absolute prior
passing them to linker. We need to make an exception for paths starting with @
such as @executable_path (Apple platforms) or $ such as $ORIGIN (Linux).
Task-number: QTBUG-31814
Change-Id: Ie9887c0046c5030c4128dda945b491a5d389ba34
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
The native Windows Runtime file picker is required to support picking
of any file/folder from the system. Due to platform security restrictions,
the non-native file dialog is effectively useless when outside of the
application's installation or local storage directories.
This adds a QPA implementation for the WinRT file picker, as well as
a simple file system engine to handle files which were opened by the
picker. This necessary for platform security reasons, as it is not
possible to open files from arbitrary paths - only file handles opened by
the picker can be used, so these are kept inside this file system engine
and acted upon when a known path is observed.
The file system engine is only instantiated when needed, and may prove
useful for other areas of Qt (such as known folders/standard paths) which
must operate on a virtual file rather than an absolute path.
Task-number: QTBUG-37748
Change-Id: Ia4fd6c5065ac92101ce34adcb6c9026fbcff56df
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Use QString::splitRef on platforms with case sensitive paths, to
avoid unnecessary allocations.
Change-Id: Iff331a5eb67c4cbaf1333e663e77290261c5b013
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
If the user requested the system xkbcommon with -system-xkbcommon, then
don't silently fall back to the bundled version if the functionality
test fails. Instead, print the an error notice.
Also note that the -xkbcommon argument didn't do anything, since it set
the variable to "yes".
Change-Id: I2c9e820bd076995aaaad987ecce76ebddcd79b4a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The comparison, Latin 1 and UTF-8 benchmarks contained in this file are
stale. The implementation changed in Qt 5.3 and this benchmark couldn't
be updated (test data too large for Qt).
Please contact Thiago Macieira to obtain the benchmarks and test data.
Change-Id: I48c19b1f1711eb73c953a30ed4da510e97a62472
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit adds tests for ref-qualified member functions, the new
syntax for functions and decltype.
__PRETTY_FUNCTION__ for lambdas varies wildly between compilers and will
produce really bizarre results after cleanup. It's not tested and is
known to be broken.
Change-Id: I70c8dbcba54790357cecba35aa45c5cc672f29d1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
And correct the comment by listing more types that are available
Change-Id: I9cb4b664f97300357a55d81bc99dd542a29e933b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
On templates, adding constexpr makes a given instantiation constexpr
if it can be.
This turns qMakePair(0,0), say, into a compile-time constant.
The effects on existing code are small, but exist:
$ size lib/*{-baseline,-paircexp} | sort -nr
6516727 211192 2608 6730527 66b31f lib/libQt5Widgets.so.5.4.0-baseline
6516711 211192 2608 6730511 66b30f lib/libQt5Widgets.so.5.4.0-paircexp
5373720 44492 15976 5434188 52eb4c lib/libQt5Core.so.5.4.0-baseline
5373504 44492 15976 5433972 52ea74 lib/libQt5Core.so.5.4.0-paircexp
5107206 125072 6080 5238358 4fee56 lib/libQt5Gui.so.5.4.0-baseline
5107030 125072 6080 5238182 4feda6 lib/libQt5Gui.so.5.4.0-paircexp
1341290 30180 2600 1374070 14f776 lib/libQt5Network.so.5.4.0-baseline
1341210 30180 2600 1373990 14f726 lib/libQt5Network.so.5.4.0-paircexp
# no other libraries benefit
[ChangeLog][QtCore][QPair] Can now be used in C++11 constexpr contexts.
Change-Id: I3872e6aa33a7d02a168516f4dfa7119efcac8c40
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
These occurrences are only in docs or code comments.
Change-Id: Ia114466a85c01e2b978396c329153044921fb20b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
{,c}{begin,end}() were added post-5.3, in 1a6f490b, but weren't marked with \since 5.4.
Add it.
Change-Id: Ide743833144f784c7d09b125e7a22f9b184ed823
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
and make QByteArrayList be a simple typedef.
As a side-effect, the constructor taking a QByteArray is no longer
available since I couldn't find a way to add it to QList<T> when T is
QByteArray. My template-foo failed me. I tried:
- QEnableIf<is_same<T, QByteArray>::value, QByteArray>::type
=> makes QList fail to compile for any T that isn't QByteArray
- make the constructor a template member
=> it compiles if the parameter is a QByteArray, but not a const
char[4] like the test was
- inheriting constructors
=> runs into ICC and Clang bugs that I could not work around
Besides, the constructor with std::initializer_list is a superior
solution anyway.
Change-Id: Ic86fbadc1104142bfd907a5c4147199bf839fb89
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Instead of abusing inheritance to provide convenience constructors,
use simple inline constructor functions. The name got a lower-case
q to indicate a free function. The usual fromXYZ() static methods
were deemed not fitting in this case in the initial round of review,
since they implied some kind of conversion while these functions are
simply constructors of formsts, which contain no data.
This also solves the problem that some of these ctors could have been
called with just one argument and were therefore candidates for hidden
QPixelFormat temporary injection.
QPixelFormatRgb was renamed to qPixelFormatRgba to explain the third
argument at the call site better.
There seem to be no users of this class in qt5.git at this time.
Change-Id: Ib4fe8ceb2d30744127b116a748724a3406400eb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Being a better quint64, it can be passed in registers, so take them as value args.
Change-Id: I8eb96a2594d910b538b651fb3ca567c0c124dd3a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
There's little point in duplicating the complex declaration (thanks to C++11), just define
the relational operators and the default ctor where they're declared.
Change-Id: Ie91545b2581c89edd434c911eb05705e2d16debe
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Initial submission of a new class QByteArrayList with the
purpose of aggregating and then joining QByteArray instances.
[ChangeLog][QtCore] Added new QByteArrayList class.
Done-with: Marc Mutz <marc.mutz@kdab.com>
Change-Id: I503af58f125d7f44fef10360177490c933e5840f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The class provides compare operators, stream operators, and hashing
functions. This class aims to be compatible with (but not restricted to)
the Semantic Versioning 2.0 standard (semver.org).
[ChangeLog][QtCore] Added QVersionNumber class
Done-with: Marc Mutz <marc.mutz@kdab.com>
Change-Id: I244c8ccc002909af03987a2df052734d1a8621a9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
QObjectPrivate::Connection::method should never be called when
the Connection was made with the function pointer syntax
This caused valgrind warning about using uninitialized value on such code:
QObject::connect(&o, &Object::aSignal, &o, &Object::aSlot);
o.disconnect(&o, SLOT(aSlot()));
Change-Id: Iaff9ecd3ddfe665db92726b420021493453c4cea
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In order to prepare the addition of WinRT and iOS (SecureTransport)
implementations of SSL the structure of some SSL files has to be
redone. Parts of certificate that probably can be reused by other
ports stayed in qsslcertificate.cpp while other parts were moved
to qsslcertificate_openssl.cpp. qsslcontext, qsslkey and qsslsocket
were suffixed by _openssl to show that these are pure openssl
implementations.
Change-Id: I7b022dec49759f882274999c0991bf95788f2a3a
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
The documentation was also somewhat incomplete when it comes to
widgets that change their tlw multiple times.
Change-Id: I09dd70167804c50a5283ab3709162c93a3827e9b
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
clang warning: adding 'int' to a string does not append to the string
Change-Id: I6dc393269a52e9482fde106c17132336cf5ce226
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
In some language, mnemonics put after label text within parentheses.
e.g. "&Open" is translated to "開く(&O)" in Japanese.
OS X doesn't use mnemonics and '&' in label text is removed.
Mnemonics in parentheses (and spaces before them) also should be removed.
Change-Id: I88c0a1f60af7e148b3cf24a4e215ce807d62bce3
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
QOpenGLBuffer::map() and related helpers are becoming useless in
OpenGL ES 3.0 and up: instead of the old GL_OES_map_buffer,
glMapBufferRange, but not glMapBuffer, is now part of the standard.
On desktop GL_ARB_map_buffer_range is present by default in OpenGL 3.0
and newer.
[ChangeLog][QtGui] Added QOpenGLBuffer::mapBufferRange().
Task-number: QTBUG-38168
Change-Id: I4e9bbe8ced9ee4d535ac32849a8c08c26d79cb49
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Add defaultFormat() and setDefaultFormat() statics to QSurfaceFormat.
These define the default values for the requestedFormat members of
QOpenGLContext, QWindow and QOpenGLWidget (and implicitly QOpenGLWindow,
QQuickWindow, etc.)
This replaces QQuickWindow::setDefaultFormat() which can now be removed.
The main inspiration here is not the convenience (avoiding setFormat() calls
for all windows/widgets), but robustness: by setting the format once at the start
of the application, all windows and contexts, including the internal share context
used by QOpenGLWidget and QQuickWidget, will use the same format, eliminating
the possibility of failing due to trying to share between incompatible contexts.
Furthermore, since such a functionality is anyway mandatory for QQuickWindow
(due to the possibility of creating windows from QML code), extending it to
QSurfaceFormat and QOpenGLContext/QWindow is the next logical step.
Change-Id: Ie94486adc489d17fecfcebb7050fecedffd2688b
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Some of it was blindly copied from QOpenGLWidget and it
does not apply.
Change-Id: I73f358f74d286d3757a3a77a9bfe06887d57514a
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
These will be needed in some template code that is to come.
Change-Id: I5b93f4320313f7b15a6404de2c98f85485735fda
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Search again when a non-Qt window with WS_EX_TRANSPARENT set is found.
Task-number: QTBUG-40555
Change-Id: I3f53be626f52dc25429661ac8ea5e9f6bb163596
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
There is no need to allocate new string while a simple reference is
enough.
Change-Id: I137b58fc180fe9a7bff9d0f9e546ca04aa9f4696
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Add build.gradle script, move Android template files to another folder.
These files are specific to every project, and they should be copied to
then project android folder.
Switching from Ant to Gradle brings lots of advantages:
- it is way faster when rebuilding (25-50% faster than ant).
- it enables first class Android Studio integration.
- adding Android Extras libs (e.g. Google Play services, OBB, etc.) to
your project is now painless.
[ChangeLog][Android] Added Gradle support to build the APK.
Change-Id: I9c8cb355118c9ac1997270c8b80916eca43fce4d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Lots of code depended on an indirect includes from qstringlist.h.
Change-Id: I33d0dce33d64302d6c0e49180cc1249b90ab27c5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
1. Use includes without module prefixes, as is the custom in examples.
2. No inline functions to make it more readable.
3. Pause animation on pressing P and document our signal connection a bit more.
Change-Id: I68dc3d4c74b639cf3fec17b63b7f49626db58bdb
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
On Linux at least the qopenglwindow example sometimes shows
"QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined"
when closing the window and exiting the application. This patch avoids
this by not triggering repaints anymore when the platform window is destroyed.
Change-Id: I54bd41e5c1471f7cdfec89f8ec3be48d1438be39
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
When creating child widgets in the derived class' constructor, the screen
cannot be retrieved via window() since it still returns null. Handle this
case properly.
Change-Id: I65bf7f9c338ce8a3ddab8ad7886cfe2f1f253c82
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Just like the recent fix for VAOs on iOS, where we might deploy a
GLES3-enabled binary on a GLES2-only system, the same issue is
potentially present for blitFramebuffer and renderbufferStorageMultisample.
Handle this properly.
Change-Id: I87268478f1de479dc2c106b46d6e9b84e866fcd5
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
If the calling thread changes when processing events, the dispatcher
will no longer have thread access and event processing will fail. This
can e.g. prevent new threads from being created. To remedy this, the
dispatcher object is re-fetched if the thread is changed.
Change-Id: I519cff521f9b84211db3f28a7a28b532de44a6a4
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Thanks to new features in ANGLE, the backing store implementation
complexity can be greatly reduced. By using ES3 framebuffer blit,
no shader code is required, and the shader loading code and blit shader
can be removed.
Change-Id: Iab3d915e279ad6468a75ef6257794f12acd8cb65
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
i.e. make them support remote URLs.
To avoid code duplication, getOpenFileName/getSaveFileName/getExistingDirectory
are now implemented in terms of getOpenFileUrl/getSaveFileUrl/getExistingDirectoryUrl.
Change-Id: If409ac9ab72c2a65f04e2ef1dc28e7d47bbcd73c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Task-number: QTBUG-39215
Change-Id: I29120f5dcc97051705bc6ebacfa5843d8953810b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This lets the Qt Quick Controls Android Style choose the appropriate
window background that is meant to be used with HW acceleration.
Change-Id: I65d6f9319d77364637460e7c4ebb7ea3f4d53f12
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
The goal of this commit to make the code in the test work:
QCommandLineParser parser;
parser.addOptions({
{ "a", "The A option." },
{ { "v", "verbose" }, "The verbose option." },
{ { "i", "infile" }, "The input file.", "value" },
});
For this, QCommandLineParser needs a version of addOption that can
take a list of options. That's what addOptions() is for.
More importantly, the QCommandLineOption ctors mustn't be explicit.
OTOH, any implicit conversion from QString or QStringList to
QCommandLineOption is also undesirable.
To solve this dilemma, add new QCommandLineOption ctors that just
take one argument and are explicit, and make the existing ctors
implicit. In order to avoid ambiguities, remove the default values
of their resp. 2nd arguments. The new ctors are by intention not
\since 5.4, as they are completely transparent to the user.
Et voila, even better than getopt_long(3).
[ChangeLog][QtCore][QCommandLineParser] Added addOptions() method.
Change-Id: I5e779f3406cd0f6c8ec6ecbf6c8074af226de300
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When re-install a package without uninstalling it first, a few files
are leftover from the previous installation which makes the debugging to
fail.
Change-Id: I603491668bcec2a6f8054951ea2dea806fcc4c88
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Remove #ifdef Q_OS_MAC around devicePixelRatio code. We are planning
to make it available on other platforms.
Task-number: QTBUG-38858
Change-Id: I25230cb53ea1291095335ef5883b15087e44f6b8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When showing an edit menu on touch platforms, you need to specify a target
rect for where to place the menu. The target rect is normally a rectangle
that encompasses the whole text selection. Using this information the OS
will place the menu so that is doesn't obscure the selection itself, or fall
outside the screen (or overlaps e.g the keyboard). Since we don't know the
size of the menu, or if the OS will end up placing the menu above or below the
pos we give it, we need to do it the correct way and forward the whole target
rect instead.
Change-Id: I638586e9d0dd14c430a22c403c6dce099192a075
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
dfde72e436 added debug support for
QWindowSystemInterface::TouchPoint, which is useful only near the
QPA interface; but in qtdeclarative it's useful to be able to log
individual touch points too.
Change-Id: I237d354d7018e6326e586ae3355c8aa6f781eff8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The enum GrayScale was renamed Grayscale without similarly changing the
helper class for the same enum.
Change-Id: Ie1b34a68654f22a843ce4cfc2ddc1bf06af8dea1
Reviewed-by: Axel Rasmussen <axel.rasmussen1@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>