The feature is enabled by CONFIG += unsupported/objc_namespace,
but can be easily integrated into other build systems such as
CMake or native Xcode by modifying the LD and LDFLAGS equivalent
for each build system.
This is a less resource-intensive alternative to using multiple
Qt builds with different -qtnamespace settings.
Note: The feature is not supported in any way, and should be
used with care.
Change-Id: Ibb8ba1159db36efd7106c117cc2210c7e2e24784
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Introduce separate scale factors for hot spot and pixmap and
set the devicePixelRatio of the scaled pixmap to 1 matching that
of the target pixmap which will be converted to a Windows cursor.
Change-Id: I0b0f6c6a79589ec954b5a1a09a86b87c91b5147d
Task-number: QTBUG-46068
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Use QCursor::pos() to obtain the position in device independent pixels.
Change-Id: Ia54701c556188f40ba678341125114d113ffe8c7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
qt_mac_set_dock_menu() needs a \relates command to show up properly.
"\since 5.2" produces "This function was introduced in Qt 5.2", which is
wrong; the function existed in Qt 4.
qt_set_sequence_auto_mnemonic() is referenced by the QShortcut class
ref, but the page that hosted it in qtdoc.git is being removed. Thus,
its description is now transferred here.
Change-Id: If009a45f1d04541787925cf230ed7b59c7db0b39
Reviewed-by: Alejandro Exojo Piqueras <suy@badopi.org>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
We have to make sure that the plugins to be tested are located inside
the virtual sandbox / relative to the application binary. Launching via
winrtrunner, a test can find those plugins then. It is not possible to
those via TESTDATA and extract them to temp, as LoadPackagedLibrary only
loads inside the sandbox.
Unfortunately this also implies that running those tests inside Visual
Studio will fail, as Visual Studio copies the virtual sandbox to another
location missing the plugins. For automated testing this should not
matter though.
Change-Id: I70f5ef2d56b3cf526b731fd885f12583c8f6e103
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Bump copyright year in tool output and user visible strings to 2016.
Task-number: QTBUG-50578
Change-Id: I2f4aa9089c6672726f554cba7e6009b425d27683
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Q_DEAD_CODE_FROM_QT4_WINCE was never defined anywhere and there are
no other engines that do similar trick; so remove the code at all.
Consider this "feature" lost in WinCE history ;)
Change-Id: I99183a07ccb45b6b970cd33414708288bd0d7efa
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Parse the requested family before we're looking/saving into the cache,
thus hitting the cached EngineData for:
* quoted family names (eg. QFont("'Arial'"))
* non-simplified family names (eg. QFont(" Arial "))
* substituted family names (\sa QFont::insertSubstitution())
* explicit fallback list, where possible (eg. QFont("Tahoma, Arial"))
This also improves the cache hitting for the font engines in some cases.
Change-Id: I18cdc3e8d669cccec961f84e9b27329402e2b7ed
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
QWindowsPipeWriter is not used in the Windows CE port.
Change-Id: I068dd2408bb21a7e2a86886e0692b1636016ff6a
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
This reverts commit cd9625fc3c.
The ambiguity in division, with negative operands, goes away in C++11
(where division is defined to truncate, hence round towards zero), so
we no longer need to be robust against it in 5.7. Added suitable
commentary to make clear that we are relying on that.
Change-Id: Id2c0d421bad4bcec87de9cc9519cd00df2456930
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Setting it to FirstSection was obviously wrong and left LastSection
nowhere set ...
Change-Id: I26260182e9d986b41b5f3a5d6df94540a5fc116a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Setting conflicts to isSet & DaySection cleared it if we hadn't seen
the day stipulated, even if there had been a conflict (e.g. over year)
before we hit the day-of-week that didn't match the (unset, so
defaulting to) 1st of the month. Explicitly test for conflict and
only set conflicts (to true) if there is a conflict. Added regression
test.
Change-Id: I7363eb66a8bb808d341738d14969039834f50db8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Eliminates separate declaration line, makes unambiguous that all are
initialized.
Change-Id: Ib419a385b38f98070c06428da246d4580b0a0dbc
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
A parameter was called index; but an inner block re-used that name.
Rename the parameter.
Change-Id: I2fa18f32aa129c5b1d8de6c4b6571438eeefea14
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Which is basically same as the Jetson K1 Pro, with SDK and compiler
options adjusted.
Change-Id: Ic0aa8144aad12e832ae440212f6a06f52668415d
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
As a result, this patch eliminates double-buffering in QProcess.
Change-Id: I436faa4a5ffc28ce77f959dd6089bef400ac39f6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Also, bump the TypeInformationVersion field in qtHookData, to notify
the Qt Creator developers that the offset of QFilePrivate::fileName
was changed and dumpers should be adapted.
Change-Id: I71bc5f509b733c0ab3430cd47ff08961f0388839
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
... instead of using erase in a loop, with quadratic complexity.
Change-Id: I91053ddb58639615e8864e5be20861e7cceb815e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
... of QLists. The returned list was only ever exactly of
size one or two, and two only if a local QList in the
getGraphParts() function was not empty.
Instead of using a QList to return those QLists, use a
small struct of two QLists. This way, we avoid copying,
memory allocations, and the code becomes a lot clearer,
because we can give the members of the struct meaningful
names, instead of at(0) and at(1).
As a consequence, at the call site, the loop over the
result can now be collapsed into an if.
Saves ~1200b in text size on optimized GCC 5.3 Linux
AMD64 builds.
Change-Id: I5c2a3b3be0edcc418b310551abca51c410aca7c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead of move-assigning a new QIcon to the default-
constructed members, initialize them directly in the
ctor-init-list. Do this for the other data member, too,
for consistency.
Also use QStringLiteral instead of QLatin1String as
the argument to the QIcon ctor. This is correct, since
the string will never be modified, and saves two memory
allocations.
Change-Id: I9398bbe9d0fd63db9b6cf856dd240ab334364518
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This is mostly straight-forward, but some things are worth noting:
1. Yes, this is necessary. The noexcept operator looks for noexcept tagging,
not at the contents of the function to determine whether to return true.
The more conditionally-noexcept functions are used, the more important it
becomes that low-level classes are correctly marked noexcept. In that, it
is like constexpr.
2. In accordance with the rules governing noexcept specifications for the
standard library itself, the get*() functions, as well as any function
taking (but not returning) channel values as ints or qreals, or taking
QStrings are not marked as noexcept, since they have preconditions and
thus a narrow contract. Narrow-contract functions should not be noexcept.
All other functions have wide contracts (ie. no preconditions).
3. Any function returning QString can throw (bad_alloc).
Consequently, they, too, are not marked nothrow.
Change-Id: I023356ba1b9a4b057e613cd45380a89b222dc09d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... Just cache it.
Change-Id: Iae70e09233b237d904ab100f46f8dc7ab9ac8e04
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Thanks to gunnar.roth@gmx.net for updating the WinCE patch.
Change-Id: I131e0ee9141efdbd377e096aae0959311a601830
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
(or trivially marked const) ... by replacing them
with C++11 range-for loops.
Change-Id: I1522e220a57ecb1c5ee0d4281233b3c3931a2ff8
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
... by replacing them with C++11 range-for loops.
To avoid detaches of these mutable Qt containers,
wrap the container in qAsConst().
Change-Id: If086bea06fe26232a7bb99fad8b09fce4dc74c27
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
... by replacing them with C++11 range-for loops.
This is the simplest of the patch series: Q_FOREACH took a
copy, so we do, too. Except we don't, since we're just
catching the return value that comes out of the function
(RVO). We can't feed the rvalues into range-for, because
they are non-const and would thus detach.
Change-Id: I5834620bf82f3442da7b2838363d351a0fb960a0
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
... by replacing them with C++11 range-for loops.
The functions QMakeProject::values(), QMakeMetaInfo::values()
and QHashIterator::value() all return by const-reference,
so they can be passed to range-for without further changes.
Change-Id: Ic3b39ed8ff8cd7a6f287f1aa9d61a1acd67d7aaa
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
... iterate over the container itself instead. Avoids
temporary QList creation as well as the lookup cost
when actually calling value(key).
Change-Id: Icac867c30e63863cfa44a382eedd4d6df2070a59
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
All other colors are hard-coded in here, only the background followed the
palette.
Change-Id: If8033a72f85f953358ffeec4edd80a36b8494c7f
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
As of change a094af0017, X11 now joins
other platforms in having a fake screen if no physical screens are
attached, rather than ever allowing QGuiApplication::screens() to
return an empty list or QGuiApplication::primaryScreen() to return
null. This is more consistent across platforms and helps to prevent
bugs in applications which want to use QScreen in some context but
fail to check whether it exists.
[ChangeLog][X11] In case there are no physical screens attached,
QGuiApplication::screens() and QGuiApplication::primaryScreen() will
return a placeholder QScreen object.
Task-number: QTBUG-42985
Change-Id: I0f58afbfe2a034fb9e872a5d1dbdabad2c7dbf9e
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
- Introduce Qt 5 signal-slot connection syntax.
- Merge MainWindow::createMenus()/createActions()
into MainWindow::createMenus(), removing the need
to store the actions as member variables.
Use QMenu::addAction() for brevity.
- For actions in QActionGroups, carry the Valuator enum
in QAction::data so that the slot to handle the selection
does not need to compare the QAction pointer itself.
- Use a non-modal QColorDialog, so that the user
can change colors more easily while drawing.
- Choose saner shortcut keys: control-Q should not
override the default usage for quitting the application,
and using shortcuts for About dialogs is anyway dubious.
- Improve the example documentation.
Change-Id: I57aaf5f5b885c13a953482dbcc41275dd3d6bff4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Replace the large switch in QStandardPaths::writableLocation()
by a function mapping QStandardPaths::StandardLocation
to the int clsid required by SHGetSpecialFolderPath(). Warn if
SHGetSpecialFolderPath() fails for config location and append
prefixes (cache/application name/organization) only on success.
Change the logic in QStandardPaths::standardLocations() to append
the writable location first, avoiding the prepend().
Task-number: QTBUG-50570
Change-Id: I9d80e83d1ca7af3ea8d3ac2c720ee981b1b2c32a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
... but they were only marked as bidirectional.
Fixed.
This change is slightly BiC, because if some class used tag
dispatching on this iterator type, a recompile might now
pick a different overload, and the old one may not be
available to a user anymore (no longer instantiated).
I do not think Qt uses that technique, yet, though. Not on
iterator categories, at least.
Change-Id: I75fb334af7e191f882d11575dec83c879a6b50ee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We depend on the assumption QFontCache::findEngine(key) for key.multi=1
returns a font engine of type QFontEngine::Multi;
guarantee that by checking it in a single place.
Change-Id: I287da4fd62deb22fc5520cde5b0505bc44547609
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
For QLatin1String, operator== is overloaded, so comparing to a latin-1
(C) string literal is efficient, since strlen() is comparatively fast.
OTOH, QStringLiteral, when not using RVO, litters the code with
QString dtor calls, which are not inline. Worse, absent lambdas,
it even allocates memory.
So, just compare using QLatin1String instead.
Change-Id: I761b2b26ab5b416bc695f524a9ee607dacf0a7b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
When the window container already has a window handle, allow embedded
windows to use this handle as a parent. This change will allow proper
window stacking and clipping.
Task-number: QTBUG-50477
Change-Id: I8d656ecb99e0c42ae7a7ac461e5e5b5d801f5493
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
c7e5e1d9e0 assumed shortcut handling could be done at the QPA
level, but this fails on async platforms where there are e.g
activation events in the QPA queue and we then try to handle
the shortcut synchronously.
This commit restores the handling to QtGui for non-OS X platforms,
and we should fix OS X by adding callbacks through the IME for
the special case of OS X.
Task-number: QTBUG-50467
Change-Id: I7460184cc60d0319f07771eec487325a17d7e7e7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
- put it in a separate private header
- add a protected QFinalState constructor that takes a
QFinalStatePrivate
- when passing through, also export QStatePrivate, so the linker can
find the symbol
Change-Id: I8563da16739731d9d6142be438a8769fc29de148
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
When we want to use qtTrId function instead QApplication::translate in
generated files it's not possible to use custom function with presented by
the --tr argument due to signature difference between qtTrId and
QApplication::translate function.
With this argument present, uic will generate qtTrId function with second
argument empty. When used together with --tr parameter it will use
presented function instead.
Change-Id: I0d986e4ea25ce58917fd9a2866b1eac0a4671502
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Port a QString::fromLatin1() to QStringLiteral.
The string is never modified.
Wrap char in QLatin1Char to construct a QChar with 8-bit character.
Change-Id: I579ca9eae0c2a72ea893254f258b001063e9f64e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
... instead of using erase in a loop, with quadratic complexity.
Change-Id: I9527923dcfc3201776a59de53dd5c03ca4d80063
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>