Ideally we'd have a callback from iOS when this happens, so we can also
react to changes done outside of Qt, but willChangeStatusBarFrame and
friends do not seem to give us what we want.
Change-Id: I686ce7950395a83c4257372363c773a95c3935ed
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
The user may use QDesktopServices::setUrlHandler() in combination with
the appropriate Info.plist keys (CFBundleURLTypes, CFBundleURLSchemes)
to react to URL requests from other applications.
This is among other things useful for handling OAuth authentication from
applications such as Dropbox. See:
https://www.dropbox.com/developers/core/start/ios
We protect against recursive URL opening, but an application may still
redirect a request to open a URL by opening another URL, eg a website.
Task-number: QTBUG-35201
Change-Id: I9f1d246206c5594b1b65bb11fa98c6bcdefc443e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
As the last line in the QObject destructor, we call setParentHelper(0) to
remove ourselves from the parent. In the process of that we also initiate the
QML parentChanged callback. The first thing that parentChanged callback used to
do (but now does it too late, after 26350b5ceafa0ade1328037f6234a7d288eb8f48 in
qtdeclarative) is to check if the object was deleted and then return. We could
re-introduce the check there, but I think it's cleaner to not bother calling
the callback on a dead object in the first place.
Change-Id: Ia4d43b65a9b3744a451b4c312a2d6f9c0e3b67dc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
NSEvent needs to be copied.
Reference:
http://lists.apple.com/archives/cocoa-dev/2007/Dec/msg00678.html
Task-number: QTBUG-33533
Change-Id: I73709545573e59aab6875a8c3dd903cb171e858f
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This class is never inherited from, so save the vtable, and
everything that goes with it (typeinfo, ...).
Effects on Linux AMD64 GCC 4.9-trunk release stripped:
text: -248B
data: -64B
relocs: -5
Change-Id: I12eec1115529eb3fc873fb9a9aacc150d9937fb9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The functions valueAt() and setValueAdd() were defined inline out-of-body,
but not declared inline. Fix by adding inline to the declarations, too.
This has in the past caused warnings on exported classes on MinGW, and it's
simply wrong, too.
Change-Id: I5922cb9ca0c5ee37408f553f0aad0e3264853827
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
QSimplex is not designed to be copied, so disable explicitly.
Change-Id: Ia1ddcfe905380e594930717c7c55bb38a7dd4059
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Determine writing system before executing the loop.
Change-Id: I6c462bdef4d70860e76c7cc9d939e3e92983b173
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
We require glx version 1.3 which is where fbconfig is first defined.
Also make use of the configure test and report the glx status.
GLX support should always take precedence when compiling the
xcb backend
Change-Id: Ie46834210bf5cd2ac4006ff08379e0d3434ffa2b
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This adds a new configuration parameter, xcb-xlib, which allows
overriding the configure test for that existing configuration option.
The use of xcb-xlib in the xcb platform plugin becomes the preferred path
for non-OpenGL ES 2 builds, while the EGL codepath is used otherwise.
This has the advantage that EGL can be used with Desktop OpenGL if Qt is
configured with -no-xcb-xlib.
Change-Id: I5018e31fe0399b94f020c671eff9414d00431c44
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
The condition under which the placeholder text should be shown changed recently,
so refactor the code to centralize the condition.
It turns out that setPlaceholderText() and paintEvent() disagree on the condition
already.
Change-Id: Id193a9a138042ab0690082dcf634cf7487a5276e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Change match() to return an index and use that to reintroduce
the blacklist bookkeeping for fonts for which font engine
creation fails (for example, due to missing open type support).
Change the algorithm to retry search if that happens.
Add empty string as fallback for non-common scripts indicating
'try to find any font matching the script' as is done in Qt 4.
Task-number: QTBUG-34908
Change-Id: I9ac81ff1c275ebb635675dc26b52394789fca60c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This patch adds more char tests for the plus and minus signs to
ensure that e.g. number input widgets can be used with the locale
and the known sign chars.
[ChangeLog][QtCore] Fixed a bug that caused negative number input
using '-' to be rejected because the current locale uses e.g. 0x2212.
QIntValidator and QDoubleValidator now accepts both signs as well as
the locale minus sign.
Task-number: QTBUG-35069
Change-Id: I857105ca38b1d3826e27eb64645fef07149d74bc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use explicit format string, that contains milliseconds, when
converting an QDateTime/QTime to a SQLite field content.
Task-number: QTBUG-24200
[ChangeLog][QtSql][QSQLITE] Fix sub-second handling
Change-Id: Ib89152b7c3dd780b57a8826beff8b6b118e9d3d6
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
As stated in http://dev.mysql.com/doc/refman/5.7/en/c-api-prepared-statement-data-structures.html
the content of MYSQL_TIME.second_part field is supposed to be
in microseconds not milliseconds.
Task-number: QTBUG-31124
[ChangeLog][QtSql][QMYSQL] Fix sub-second handling
Change-Id: I5718868029bdedab9508213e800d2dcf3da9be9a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
The ip address should be set before the netmask. The reason for this is
that QNetworkAddressEntry::setNetmask() compares the protocol of the
netmask and the ip, if they don't match the netmask won't be set.
Task-number: QTBUG-33911
Change-Id: Ic344b3653c5dfdc5df912dee16e4dbe069d57d24
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add a check for the case sensitivity of the file system, so that
unit tests can determine whether names of preference files with
different case should generate an error or not.
* Add check for OS X native file format in rainersSyncBugOnMac().
Task-number: QTBUG-32655
Done-with: Liang Qi <liang.qi@digia.com>
Change-Id: I76821653dd4ebc00e20abdbb5b79c1a80290dece
Reviewed-by: Liang Qi <liang.qi@digia.com>
Most of QPrinter assumes that QPdf is available as the fall back engine
in case either the plugin fails to load or there are no real printers
configured. Make this assumption explicit in the feature configure and
remove the two places where QT_NO_PDF is actually checked.
Change-Id: Ibb1bdf3bafa5809fbc844c84d7127911a1685506
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
from QXcbNativeInterface. The QPlatformScreen is available from
QScreen::handle()
Change-Id: If81daf34c07f4a49c85c43d3755d1a9167626d6d
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Currently Qt::WindowFulscreenButtonHint is only
respected on window creation. But flags
can also be adjusted later on.
Further setWindowShadow can be removed from
within createNSWindow, as it operates on a Nil
object in that case. It is however called by
recreateWindow / setWindowFlags subsequently.
Change-Id: I507d6fde5ad2f0ee5b9db322325ede99b70e151e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
As of CMake 3.0, the output of `cmake --version` now has a second line
showing that it is maintained by Kitware. Change the version parsing to
look only at the first line of output.
Change-Id: I347de4c376e0bde25a43a38d59587d9b63f6b43a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
desktop opengl and egl are not incompatible with eachother, so there
is no need to disable egl when on desktop opengl
Task-number: QTBUG-34949
Change-Id: I757c38674a480910d1cb23853c255eb993e107ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
The QWindow-based fallback will not work when the QOffscreenSurface is
created outside the main thread. Show a warning in this case.
Note that it is fine to use the QOffscreenSurface instance in another
thread. It is just the creation that must happen on the main thread.
Change-Id: If80da39e610813755b9ba2f6831b187b258b8266
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
The bit should be set when QSurfaceFormat::DeprecatedFunctions is
_not_ specified. The documentation was correct, the implementation
was not.
Change-Id: If7202d3a59d5336fff255a290b65fb4bfa7b79c9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This reverts commit 65b12fbdb1.
QFontEngine is not always loaded from QFontDatabase, resulting in
the flag not being set.
Change-Id: I39bc5bd4a8dea153d191cfc55f4324195f75f64c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The code assumes that there is a root window, and crashed
otherwise.
Task-number: QTBUG-35121
Change-Id: Idbf0e0bfc03cd427f0aab81db88b34fe94228c81
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
This is inappropriate on Windows, and breaks non-prefix builds there.
This is only needed when we calculate a relative path from a sysroot,
so only add it in that case.
Task-number: QTBUG-34880
Change-Id: I0e3b3d977a7b56649e4ba0077ac574aabf1dc915
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
For the conflicts in msvc_nmake.cpp the ifdefs are extended since we
need to support windows phone in the target branch while it is not there
in the current stable branch (as of Qt 5.2).
Conflicts:
configure
qmake/generators/win32/msvc_nmake.cpp
src/3rdparty/angle/src/libEGL/Surface.cpp
src/angle/src/common/common.pri
src/corelib/global/qglobal.h
src/corelib/io/qstandardpaths.cpp
src/plugins/platforms/qnx/qqnxintegration.cpp
src/plugins/platforms/qnx/qqnxscreeneventhandler.h
src/plugins/platforms/xcb/qglxintegration.h
src/widgets/kernel/win.pri
tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
tools/configure/configureapp.cpp
Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
Tweak a handful of tests which didn't compile on this platform.
Change-Id: I208d9eb289dfb226746c6d0163c3ea752485033b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
In cases where QGuiApplication is instantiated by a library
embedded into another application via some plugin mechanism
(for example, Active X controls built using Qt), the QPA platform plugin
and other plugins cannot be found next to the application executable.
In this case, the library should set the application file path to
its deployment location such that plugin paths are set accordingly,
the directory is added to the path and qt.conf is found, should it exist.
Task-number: QTBUG-34989
Change-Id: I4a53104b5121a8d26751129912f999228be45dfd
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
The QPrinterInfo copy and QPrinter constructors and the assignment
operator were not taking the shared_null into account, and so any use
of them resulted in a new null QPrinterInfo different to shared_null,
which lead to isNull() always returning true in anything other than
the simplest use case. While fixing this also make the shared_null a
Q_GLOBAL_STATIC.
Task-number: QTBUG-21087
Change-Id: I0beb24088208e9ed58d21ca26b0c8d00b02e5b8f
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
We want to cast the print engine, not the paint engine.
Change-Id: Ia8f11f0215fa066417118fbfbcc921a60282d713
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Since contains() just wraps indexOf(), which has a QLatin1String overload,
add one for contains(), too, for consistency.
[ChangeLog][QtCore][QString] Added QLatin1String overload of contains()
Change-Id: I2acc628a51e00789fb2b90400cf0c523a5b5e65a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
For plugins that are built with a different (but binary compatible)
MSVC runtime than Qt is built with, the plugin's embedded manifests
prevent a successful loading of the plugin.
There's no need for having the plugins tied to a certain CRT version
as they are bound to Qt's CRT version.
Task-number: QTBUG-1297
Change-Id: I6ae4cadd99ee4657e613b07a40141a7bae08424f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
As seen with Xcode 5.0.2.
qmacclipboard.mm:108:30: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
promiseKeeper(paste, (PasteboardItemID)promise.itemId, flavor, this);
^
qmacclipboard.mm:316:56: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
PasteboardPutItemFlavor(paste, (PasteboardItemID)itemID, QCFString(flavor), 0, kPasteboardFlavorNoFlags);
^
Change-Id: I94b8ea2ff32d606d4cab28981b26c2ef516035dc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
-[QNSListener notificationHandler:] was declared as not taking any parameter,
but used as taking a single NSNotification. This would lead to an 'unrecognized
selector' exception raised by Cocoa.
Task-number: QTBUG-26844
Change-Id: I56d03a7738c2a1b9dcf3cdecc696b01e65d7b233
Reviewed-by: Liang Qi <liang.qi@digia.com>