Recent commit 105d10de introduced the QMetaStringTable(QByteArray) constructor,
but failed to mark it as explicit.
The argument, the class' name, is not an equivalent representation of a
string table, so mark the constructor explicit.
Change-Id: I2f141969400b98d3253283bd6fb0b9d18f2d53b3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
First set up the selected output format, printer and page size, and then
setup the selected job options. This ensures all values are correctly
setup for the requested format and printer as not all settings may be
able to persist across the change in output format or printer.
Change-Id: I67f261f4e3be479a9018139633886ee8e570f42a
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This makes it slightly more obvious which compiler should be used with
which.
Task-number: QTBUG-23119
Change-Id: Ie3e5cf995d686bfa846902a040668716c8b5f526
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
In commit 0c936ca83c we fixed the case
where the window was maximized programmatically, but if the window gets
restored by clicking on the taskbar we don't get to set WithinMaximize
flag, since we immediately get the WM_GETMINMAXINFO request from Windows.
To reproduce the problem, run tests/manual/windowflags, remove frames,
maximize, minimize, and restore by clicking on the taskbar.
Task-number: QTBUG-8361
Change-Id: I8a7cf4fccbb2c3dac5f570848501ac1e8d2c2307
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Don't copy the dialog settings to the QPrinter before the Print button
is pressed, in case the Cancel button is pressed instead. The settings
already get copied in the right place.
Change-Id: I84d0053b450cf5839bf1a879af013f305a8fd377
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
The print dialog was setting the PageOrder on the QPrinter as soon as
the check box was toggled and not when the Print button was pressed,
meaning the change is not forgotten when Cancel is pressed.
Change-Id: I19637b7efacfb5388c70d2e7d9d05a05ecc5b2ea
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Instead of enforcing the check, we'll simply trust developers to do the
right thing. For one, it's useful to mix libraries during testing
(regression testing, git bisects, etc.). For another, Qt developers are
faced day-to-day with binary incompatibility issues anyway, so this
check is mostly superfluous.
If there's one commit we could be sure that isn't breaking binary
compatibility, that's the "Bump Qt version" commit. And yet that's the
one that would cause the fatal to trip...
Change-Id: I8965f764a6ca1b2d125b42bce7ac6b27e3afc8ac
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
QHash::key() is O(n) and we're calling it n times. That can make repeated
calls to the meta object builder very slow, as for example QQmlPropertyMap
when inserting properties repeatedly.
Fortunately this is easy to fix, as the value in the hash map is also the
index, so we can simply iterate over the hash once. With the exception of
the class name, which we have to treat specially to ensure that it is always
the first entry in the string table.
Task-number: QTBUG-32720
Change-Id: Ic954c45c454107feee83216131f601cc69d4c63b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Brings Windows QPA on par with other platforms.
[ChangeLog][Windows] Don't cover the taskbar when maximizing
frameless windows.
Task-number: QTBUG-8361
Change-Id: Iba35132f697cb7379650a4c883b616c5c2023d4c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
qstrlen() returns a uint. When assigned to an int, the compiler warns
about sign conversions. Because these calls are used within templates,
the code appears in user generated code, and hence the warnings cannot
be suppressed by the -isystem directive. Using the -Werror flag, makes
the user code fail.
[ChangeLog][QtCore] Fixed sign conversion warnings in code using QMetaTypeId.
Change-Id: Ib7603679d6526467f8cbb9d7bcf5f56c6af47ceb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Make
QCommandLineParser::add{Help,Version}Option()
QCommandLineOption::setDefaultValue()
QCommandLineOptionPrivate::setNames()
have transaction semantics: either they succeed, or they change nothing.
It's trivial to provide this guarantee, so do it.
Add a test for the surprising property that setDefaultValue("") resets
defaultValues() to an empty QStringList instead of one that contains
the empty string.
Change-Id: I61623019de3c7d2e52c24f42cc2e23ec5fddc4da
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix isValidId() which was failing valid IDs because it was splitting
name parts by \ instead of /. it was also rejecting offset from UTC
formats names. Add unit tests.
Task-number: QTBUG-35025
Change-Id: I4d23d2e54f4a9fac9afcc4eff0a02d6f4af21385
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The code was there to do it, but it was using minimumValue instead of
maximumValue to test if the '+' should be allowed.
Task-number: QTBUG-20691
[ChangeLog][QtWidgets][QSpinBox] Entering positive values with the '+'
prefix is now allowed.
Change-Id: Iff62d073e350dc9a33b7e06e4b492048c74437c4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
We want to make sure that there's a constant propagation from the static
variable that is filled in with the current code-generation options.
With most compilers in debug mode, we'd carry dead code. With MSVC, even
inlining is really bad even in release mode, and it doesn't perform
constant propagation even with __forceinline.
Change-Id: I7a95ff6622b864771243990bb5e205b2df0c33fc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The definition and usage of QNativeGestureEvent had already been
protected against QT_NO_GESTURES but the implementation had been missed
out before.
Change-Id: Ie039e08257ad5eb7705342e4248b904f6ceca8df
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
(same thing for center- and delimiter-aligned tabs)
The width of the inline object wasn't taken into account, the code in
QTextEngine::calculateTabWidth only looked at glyph widths.
Change-Id: I303a6561c67870ff2094a685698e642fc1b53b12
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Change highp to mediump. This qualifier is ignored on desktop, and
mediump should be sufficient elsewhere.
Task-number: QTBUG-35353
Change-Id: I79f0ed88717d45dada5dcb781e75b10e72db4bd0
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Moved qdoc and image file to correct qdoc folder.
Added brief and ingroup statements to books.qdoc.
Task-number: QTBUG-34749
Change-Id: I5806ffd6f116cccf10238e3e1a9fc627ad0e93a9
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Otherwise Xcode might choose to use libc++, eg when the deployment target
is iOS7, and this doesn't work when Qt itself was built using libstdc++.
Change-Id: I0b0f36666ed318be9aae87ebaeb0d344109566ac
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
The functions fromBytesToWord() and fromWordToBytes() are called when
building on 64bit BigEndian platforms. It fails because those
functions are disabled on the source code. Enabling those functions for
64bit BigEndian platforms fixes the problem.
Task-number: QTBUG-35228
Change-Id: I5ccacd4fb5051df05f67c8da879b3a9e49953861
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
During show() of a QAbstractScrollArea we might get resize events, which
results in laying out the children of the scroll area. One of these
children are the scrollbars, and raising them to the top means creating
them, which in turn means creating all parents, including the abstract
scroll area itself. Creating the abstract scroll area means creating
a platform window, which might send synchronous resize events as a
result of creating the window, and we end up recursing.
Change-Id: I1a2813f03091d6c42e51834315835551cb2fd621
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
If a platform window is created from a QWindow without setting a valid
size or position on the QWindow, the platform window is expected to
apply sane defaults. We use the baseclass initialGeometry() function
for this, similar to other platform plugins.
The default geometry unless otherwise set and/or calculated based on
size hints is that of the screen's available geometry.
An improvement to this is to detect whenever we apply the screen
geometry, and also apply the appropriate window state, but that
needs more testing.
Change-Id: I02b12064ce6d55c04fe0cc2cd1d2816ca1113f40
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
When sending expose events to Qt, Qt will ask us if we're exposed,
and we need to tell it that we're not, so that clients will not try
to makeCurrent on a CA layer that has a zero width and/or height.
Note that this only works because we flush expose events.
Change-Id: Idfbe03a2f35681084061376a3c650a8da027fda4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Make QJsonObject::const_iterator() part of the same doc
group as the non-const variant. Also add a \since
command with the correct value.
Task-number: QTBUG-33052
Change-Id: I97fa2cc44dae93decf2b99a1384e37579b7dac46
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QtAndroid::findClass uses loadClass methods to find Qt's java classes.
The documentation says that we should use a binary name.
Change-Id: I2146789235435b7052827cde58b7719b7d62dc1d
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
it's bogus in the first place that the meta files contain windows paths,
but straightening that out is a prohibitive effort. so instead generate
additional s/// commands which take care of these paths.
fwiw, the generated s///i command is a gnu extension. but as we are
doing this on windows only where we are using our built-in sed command
anyway, this should be fine.
Task-number: QTBUG-33794
Change-Id: I46fcc598db12816ee56b5371ab184f6277eb3a22
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
for in-source builds, we end up attempting to install the modules-inst
dir in case we re-run qmake after some modules have been built.
Change-Id: I50d4d394bfd6f48b9a5f5faa584919710a03dea9
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
And that connectNotify and disconnectNotify might be called from
another thread
Task-number: QTBUG-34829
Change-Id: Id118b97b92e9aa085a1d4368282294f90cfb1706
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
This is a consequence of us wanting to show the OS X transient scrollbars
as soon as the user touches the trackpad with two fingers.
Task-number: QTBUG-35120
Change-Id: Icf63b0ec8c32ac66108822804bb06a0762547ef1
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
For example QIcon can return pixmaps with non-integer devicePixelRatio,
if there is no pixmap that exactly matches the requested size.
Task-number: QTBUG-35125
Change-Id: I76bfa2766979a454c24b1abcf9e18930f5671c1e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
In some cases the classLoader is not able to resolve fully-qualified
names that contains forward slashes. Unlike FindClass() which expects
the fully-qualified name to contain slashes, the classLoader expects
the binary name, i.e., with '.' as separator.
This caused a crash in QtMultimedia when accessing a nested class.
Task-number: QTBUG-35298
Change-Id: I77728352fbab930ae1914bc1cb2189e458e179e2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Currently there is no way to always hide the statusbar
on iOS other than showing a window in fullscreen. This
patch will check if the statusbar is (initially) hidden
from the Info.plist, and respect that in the application.
SubAttack is an example of an app that (because
of styling issues with MainWindow margins) manually
sets the geometry larger than fullsreen, and calls
showNormal(). In that case we still want the statusbar to be
hidden.
Change-Id: Ia365d14971978360d0b39621ff0f8f82f74b57e2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Going through the platform window failed when the parent wasn't created
yet. We can still get the window state of an yet-to-be-created top level
window.
Change-Id: Iaa61ddc50df037ac0bd2fd0884884c2bfce1dd9a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This reverts commit 2eb1e28a90,
which makes several of the OpenGL examples crash on startup.
(textures, hellogl_es2)
Change-Id: Id47d2df6f57b2396c333e478b3c062f4cb4becb5
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Qt defaults to creating a QWindow as offscreen surface
if QPlatformIntegration::createPlatformOffscreenSurface
returns 0. Using an offscreen surface is often done
in a background thread, which is problematic, since then
a QIOSWindow will also be created in a background thread.
According to Apple docs, working with a UIView from other
threads than the main thread should not be done. In our
case, we instead hit an assert in QApplication that
checks for the same.
As a quick fix for Qt 5.2, we remove the offending call that
causes the assert, since we anyway will call the same function
lazily when becoming first responder.
Task-number: QTBUG-35378
Change-Id: Id35462f99783a9748c688b163f6497de9bfff73e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>