This actually involved tiding up QObject sources a little bit
to clearly separate QString / QRegExp overloads of findChildren.
The corresponding qFindChildren overload for MSVC 6 compatibiltiy
was *not* added.
Change-Id: I84826b3df9275a9bda03608a5b66756890eda6f8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
QVariant handlers can not be unregistered. We are not able to guarantee
that such operation is safe and we do not want to.
Change-Id: Id9a12e6a8c750110e4a08eab1de3e07e5c408675
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This add a bool as return value on QCoreApplication::installTranslator
and QCoreApplication::removeTranslator. It returns true on success.
Before it was very clumsy to detected this. It was needed to react
on the signal and mark a success - just to provide an error message
on failure.
This is 99.99% source compatible - only if someone grabs a function
pointer to this - it will break the code - but it seems to be very
theoretic.
Change-Id: I947fcee1352f530e559bb177a90c10d84eed1aec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This patch changes invalid QVariant qDebug stream value from
"QVariant(, QVariant::Invalid)" to "QVariant(Invalid)"
New tests were added.
Change-Id: Ia57d4fc2d775cc9fce28e03eba402c2173845b35
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Use QMetaMethod::name() instead of parsing the signature.
Use QMetaMethod::returnType() instead of resolving the type id
via the type name.
Change-Id: If5d0198c5f1329fd9d9340acd58bd4a36933d960
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Make QJsonValue, QJsonObject, QJsonArray and QJsonDocument
first-class meta-types.
This is an enabler for a lightweight integration with QML.
Change-Id: I4725efdd2746cf97fd26d3632a99e8eee849f834
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The view will query the delegate for roles which are relevant to
the particular delegate. For unrelated roles, the delegate
will not have to repaint when the data changes.
Change-Id: If8f1ba4c2bce7dbcf70de344b984aea1deca0edd
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: David Faure <faure@kde.org>
The virtual method will be used to implement
the patch at http://codereview.qt-project.org/#change,11763
Change-Id: I6d6ffbb8aaaba73e5c769f3435cc60323c77b75a
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
In Qt 5.1, http://codereview.qt-project.org/#change,19113 can be rebased
on top of this change in a compatible way.
Change-Id: If7ac0481a3b2a874528de4ef6ea7535501a4ac71
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Clear all the Q3* items away,
expect QStyle::SH_Q3ListViewExpand_SelectMouseType which is still used
by QTreeView. So simply removed Q3 from its name.
Change-Id: Ia79f0283137b6751ba68791ae55df1d8bd7ea74a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This will allow separation of API that should work with QString
results, and API that should work with QByteArray results.
Change-Id: I5be398188abd421bb5056cea2658ea85fc03aa4f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Remove some "safety" code, but essentially it was a dead code.
Change-Id: Ie19c29d4cce8b72be5dbaca53c03adc63e8c3dc5
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Without this, QMAKE_RPATHDIR is empty and qt_module.prf's logic to turn
on absolute_library_soname fails, causing some modules to build without
absolute paths (eg. qtjsbackend's QtV8 framework).
Change-Id: If03136ca60a5d8a96a589e2d1034e5884fd6a1ac
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
- Changed benchmarks to use TESTDATA and QFINDTESTDATA
- Fixed up targets all use tst_bench_ syntax
Change-Id: I5c2936702e248478f5df225ce38893158ee22d7f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Also make the handling of events in the test pointer
based since mac-g++ doesn't seem to like const
references the way they were before.
Change-Id: I7fe39978d4729b8e586be30978b74aa51ca7cfe6
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
These were not covered at all by tst_qmetatype.
Change-Id: Ic957470ac78b2c15fe449efe17e1f178a41c3690
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
When cross-compiling, the qreal type can be different on the target
than on the host (e.g. double on host, and float on target). moc is
a host binary, so it shouldn't try to resolve the type id of qreal,
but instead always output "QMetaType::QReal" (which is just an alias
for QMetaType::Double or QMetaType::Float, depending on the target).
This was a regression introduced in commit
f95181c7bb (new meta-object format);
the special-casing for qreal should have been kept.
Moved the code that generates the type info into its own function so
the logic is shared by generateFunctions() and generateProperties().
Change-Id: I2b76cf063a08ba95a7e6033549452355f67283ac
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Makes no sense to disable iconv based on QPA. This change will
make iconv as the "system" codec i.e the codec used for 8-bit
locale dependent conversions.
Change-Id: I4469e9c226b2411ac1338f61dabb84ec9c2ec603
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Cocoa sends function keys (e.g. arrow keys, backspace, F1-F35, etc.) as
Unicode characters in the U+F700-U+F8FF range. Do not deliver text for
events that contain a single control character (to match Qt 4 behavior).
With this fix, keyboard navigation works again in Qt Creator when
running against Qt 5.
Change-Id: I5854bf713c2855dbc5ee491bace2f9dc1acd9426
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
KeyPress events could be shortcuts or deadkeys, but we don't know which
until we try. Shortcuts take precedence over deadkeys, so send them
through QWindowSystemInterface::tryHandleSynchronousShortcutEvent()
before passing it onto the input method.
Change-Id: I479a3a7ff1c35e7c5692e8a17fb2173576dd0a29
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
This involves invoking the Moc classes directly and using the data
structures it provides instead of invoking the moc exectutable and
parsing the generated code.
Change-Id: Ia5c654e8ef58d52d0d3376252c13e13885f80da3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is the pristine version from qttools at
a0e2b3e96be934438974b175d0e640ed30f4efcb.
Change-Id: I38eafde3f4b909bb63988f855672a908cae41d2c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is the pristine version from qttools at
a0e2b3e96be934438974b175d0e640ed30f4efcb.
Change-Id: I4dc7c7fd98637cecfc57a9be61063d351b660e72
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QPointer has been un-deprecated and one behavior which slightly different
from Qt4 has been fixed.
see SHA: b8773165d7
and SHA: 497622cafe
Change-Id: I4bae2cce3ebfebd8f59b18b5a6a7a7226b8353b9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
This function sends a shortcut override through the shortcut system and
returns the result of the event. This will be used in platform plugins
(such as the Cocoa plugin) to make sure that shortcuts work when the
user presses a dead-key combination that normally would go through an
input method to produce text.
An extended overload taking native scan code, virtual key, and modifiers
has also been added.
Change-Id: Ia3836229ab0c66d2fb6f310e72b6f4d6dfa9ead9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
They are needed by the qdbus tools.
Change-Id: Ia1994f6a9bfa2ce1d526fd3e49370fd188ce5972
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Needed by QtWebKit now.
Change-Id: I177d8dcf6063a14501f7ba3081b43a29a48661c7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Having an empty Json object ({}) should be valid meta-data but this
check means that there needs to be at least one key-value pair or
the plugin will be rejected.
Change-Id: I578ccc35016af16fd30b3807e796fa63c0282f30
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
qstring.h: In constructor ‘QLatin1String::QLatin1String(const QByteArray&)’:
qstring.h:667:129: error: ‘const char* QByteArray::constData() const’ is not ‘constexpr’
QByteArray has a destructor and therefore cannot be used in constexpr,
so do not mark it as constexpr
Change-Id: I037e9ae73a244660923eac791cc3e0082d1d7a63
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
C++11 adds cbegin()/cend() functions for the same reason Qt has
constBegin()/constEnd(). This patch adds these functions to the
Qt containers with the same implementation as constBegin()/constEnd().
It also fixes the return types in the documentation of existing
constFind() functions (documentation only).
C++11 only adds cbegin()/cend() (and crbegin()/crend(), which Qt doesn't have).
In particular, it doesn't add cfind(), so I didn't supply these, even though
Qt comes with constFind().
This is a forward-port of https://qt.gitorious.org/qt/qt/merge_requests/1365.
Change-Id: Ida086b64246b24e25254eafbcb06c8e33388502b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This re-enables shortcut context matching for menubar actions.
Change-Id: I0d9f2b3d4316a4611afe96eb1a2cf29cb9e91851
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Fix an issue where the cache was updated with the folder icon,
even though this is never used from the cache. This caused
files to sometimes be shown with a folder icon: If a folder
has an extension (e.g. a folder named 'folder.ext'), this
means the folder icon will be written to the cache for the
'ext' extension, and from that point on all .ext files will
be shown with the folder icon.
The fix is to not save an icon in the cache for those cases
where it will not be used from the cache anyway, by using the
same condition for updating the cache as for reading it (which
is in line 8 of the same function).
Change-Id: I9ce8fca0718b2b62b9390fa64989acd54952a88e
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Use the title from the index.html page for the
navtitle, if there is a title on the index.html
page. Otherwise use the project as the navtitle.
Task-number: Mzilla bug - 7229
Change-Id: I25fc1f09b0bdff58c6340cec7d9d8a43d95845a2
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
This patch ensures that additional runpaths passed to configure via
the -R switch are added to the QMAKE_RFLAGSDIR variable.
Previously, although runpaths provided in this way were appended to the
linker options when building Qt itself, they were not appended to
the QMAKE_RFLAGSDIR value written to mkspecs/qconfig.pri. This meant
that the DT_RPATH attribute was set incorrectly in binaries built from
projects other than Qt itself.
-----------------------------------------------------------------------
Configure flags Expected value Value before this fix
-----------------------------------------------------------------------
<none> DEFAULT_RPATH DEFAULT_RPATH
-no-rpath <empty> <empty>
-R X DEFAULT_RPATH:X DEFAULT_RPATH
-no-rpath -R X X <empty>
-prefix Y Y/lib Y/lib
-prefix Y -no-rpath <empty> <empty>
-prefix Y -R X Y/lib:X Y/lib
-prefix Y -no-rpath -R X X <empty>
-----------------------------------------------------------------------
DEFAULT_RPATH = /usr/local/Qt-${QT_VERSION}/lib
Change-Id: Iaf1809b528ebd249694cf41e004173e881ca48ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
QStringBuilder will be enabled by default so qmake should build with it.
qstringbuiler.cpp has to be compiled in just for the convertFromAscii
(The alternative was to build with QT_NO_CAST_FROM_ASCII, but that would
be too much work)
Change-Id: I1fbeed7ed8a9d3bc38ef591a687c50644980e2fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
When built without fontconfig support, the basic unix font database
relies on fonts installed in libs/fonts to populate the database.
Change-Id: Id1e54c5b032095470049210bb831cfe4c79b3569
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>