On Windows, Unicode command line arguments are re-created from
the original command line filtering out the known arguments.
To avoid having to hard-code all arguments of derived application
classes, keep the original argv-array and use that to verify if
an argument is still present.
Task-number: QTBUG-25724
Change-Id: I5d7bbd9530b1b74e1dcd22a0edc4f323ef687d23
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The Unicode non-characters are 32 characters, from U+FDD0 to
U+FDEF. The code matching these comments was fixed in
9327bc87c3, but the comment wasn't
fixed.
Change-Id: I5bde0ab9d70c1c6623893de36d31235cbd9fb152
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This adds the Visual Studio 11 mkspec
and the corresponding changes to configure
and qmake makesystem.
Change-Id: I3a7e82a6f7f90aa0a94dedd493ebaa66bf100923
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
The basic config file includes the macros file already if needed.
Change-Id: I8b03360ce1e9fff4a3be5270f659dbe22fc1b295
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This is required if Qt is installed into a directory with spaces.
Change-Id: I1d6874265558d712ac98a3aef670c2934a632ab1
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Copying events is a bad idea but it is permitted, used at least in the
state machine framework and QApplication, which somehow found it
amusing to clone events. We can't forbid it because it would be
source-incompatible with Qt 4, and other ill-advised developer may be
doing this.
In the new copy functions and in the destructor, ensure that the d
pointer is null. We can't copy it if it isn't. The exception is for
DeferredDelete events, which use the d pointer to store the loop level
count. Such value must not be deleted.
In the future, if QEvent::d is used at the QEvent level, make sure to
adapt QCoreApplication::postEvent to store the counter somewhere else.
Task-number: QTBUG-25070
Change-Id: I1f2d3f3cfc891ec216df2e8b7dbe531524d21b26
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Try to use a builtin codec as codecForLocale() if possible
first. Fall back and instantiate the iconv codec only
if that failed.
In addition, make sure we initialize the locale correctly
before we try to setup the codec.
Change-Id: I86d635f9d11e8ff93093f162e79fb37f3d85731b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The parser is recursive and too deeply nested json would
cause it to exhaust the available stack space leading to
crashes.
We now abort parsing with a DeepNesting parse error if the
document is too deeply nested. The current nesting limit
is set to 1024, which should be more then enough for any
real JSON data set.
Change-Id: I4adea3fd727149f7342536d73cf4530361a0a3a1
Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
In rare cases, if the section is empty, we're reading the whole object
into memory because size -1 = UINT_MAX.
Change-Id: Ibf9a1534159ce626e4f2327536076d0cc1ebf0ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This reverts commit a17523805e56511465550a6a93a88b3fc3c8325a
The compatibility overloads were removed in change Icf108a80177155f21bb73c165fb8ab5d4e997bc2.
Change-Id: I4861f281451d66a1aa5f3525eea1773dfef0540e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Because the QPA font database would query fallback families inside
findFont(), support for requesting multiple font families in order
of preference (like QFont("Times New Roman, Arial")) did not work,
because the Arial fallback was never attempted. To fix this, we
pass in the queried fallbacks and make sure they are tried before
any platform specific fallbacks.
Task-number: QTBUG-20986
Change-Id: Idb2b717856f013ce2874f00a8debaff60176d2fc
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
+ QChar::LastValidCodePoint enum value that supercede the UNICODE_LAST_CODEPOINT macro
replace uses of hardcoded values with the new API; remove leftovers
Change-Id: I1395c9840b85fcb6b08e241b131794a98773c952
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
inline all non-static members to a static ones (declared with QT_FASTCALL),
ushort converts automatically to uint and the conversion cost is minimal.
Task-Number: QTBUG-13052
Change-Id: I189a6f205736766adcd3de2d61cee71f30cc64f3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
texts for the textKeys are stored each in a separate COM(ment) section
so that the maximum text's size is almost 65KB
Task-number: QTBUG-10568
Task-number: QTBUG-111
Change-Id: I7d693741e10e5d78d497cb0af448160077350bb2
Reviewed-by: aavit <qt_aavit@ovi.com>
When qt_ntfs_permission_lookup is used, QFile::permissions failed
for files with long filenames.
Also created a test case for this API, which revealed another bug.
Task-number: QTBUG-25629
Change-Id: I73b7676a9d059c0e782b3f701b2e6bbc92f671ed
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
This can be enabled again now. The sender transfer test is still not
re-enabled since the test would take to long to run if sending
enough data to overwhelm the reciever's kernel buffers.
Change-Id: I4056fdca53ec8ebbcc53dfdc814d8bfdbc73f7ce
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Incase there is no bytesAvailable on the socket there is no need to
try to read.
Change-Id: Ied9e4b8d86854b356a733fab4948739db206b6ad
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
When we get a remoteHostClosed we should try to read everything from
the socket before we close the channel.
Change-Id: Iaa87d79ea16d69735f6ba3e8b3b4a0f86fbd5f73
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
When a file is specified on a path that includes a drive letter
followed by a colon but no slash then it didn't always account
for the fact that this refers to the current path on that drive.
This fixes the problems in completeBaseName(), baseName() and
path(). Tests are also added for these three cases and some
others too.
Task-number: QTBUG-25353
Change-Id: I47a197c6af066f532442ad269be57597ec61303a
Reviewed-by: Irfan Omair <irfan.omair@gmail.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
As the udev device tree structure varies between distros and udev
versions, first probe the actual leaf node for device properties.
If leaf does not contain needed properties, walk up the tree to the
next node matching the queried submodule.
Change-Id: I09329d5a76a1a2a797513f4a787cb27fed5293c7
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
If CUPS printer default is not DuplexNone then setting duplex
to None for printer did not have any effect on duplex setting.
Change-Id: Ifdd82241952c9a63cdf9b53fe787f7503b8049bd
Reviewed-by: John Layt <jlayt@kde.org>
Initially we didn't do this because someone could accidentally create
another target of a conflicting name, and used a variable to store whether we
have created the target already or not.
That wasn't adequeate to deal with finding the package in a scope
like a function, so we used a directory property. However, the directory
property is not valid in the same scopes as the defined target. For
example, finding a Qt module in both a directory and a subdirectory causes
a conflict.
As it is already unlikely that a target would be accidentally created with
a name like Qt5::Core, we should simply use the IF(TARGET) form.
Change-Id: If64f25d45f51edcd1edb0d4bfb5ed3bb2479bd27
Reviewed-by: David Faure <faure@kde.org>
On some systems prior to this change the code
would not build with the following error reported
by gcc:
error: integer constant is too large for 'long' type
Change-Id: I778bce9a72ccf3a41cdf17883d734082ed3fb4b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Keyboard,mouse and touch plugins using evdev now either
use udev for device discovery or the plugin arguments
for fixed device paths.
Change-Id: I72606ad48c15c55a49724a82f7bc285dd3984c43
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
The type of the sh_size field of a section header is either Elf32_Word or Elf64_Xword,
so the type used cannot be qelfword_t (always 32 bits) but qelfoff_t.
Change-Id: Ia380b6823913fee7a96b39f742630ae3a9ca0cb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Arvid Picciani <arvid.picciani@nokia.com>
When looking for a suitable "fileToOpen", do a case insensitive
file name comparision. So that it also works in this scenario:
AnExample/anexample.qml
Change-Id: Ic4cd1d59a7a35e534bfd26cd174a3c2ab5383025
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
In the event customer code (namely Qt Creator) does not pass a
clean specification (corresponding to 4.8 behaviour).
Change-Id: I8271e3a45bea4bea912fcdf0b7c0aae6c022c6a8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
The Qt configure script and various qmake project files interpret
mkspecs with a win32-g++ prefix as needing special mingw treatment.
This patch corrects one instance of the too-specific "win32-g++"
qmake platform scope and broadens it to "win32-g++*" -- bringing
it in line with the rest of the Qt project files -- thus re-enabling
custom mkspecs for crosscompilation.
Change-Id: I8c5107053ce9e0c499002b1990b492bda0eec52b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Normally you want to pass -installdir $$[QT_INSTALL_DOCS] to qdoc by
default. However, if you want to force the generation of URL links to
the documentation, the option cannot be specified.
By setting the QMAKE_DOCS_INSTALLDIR variable in default_pre.prf a
project may override it at will, as for example Qt Creator would do.
Change-Id: Ib31f03acf4e8050cf2dd3aa33f3a10ed027f1df7
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
- Add HFONT, LOGFONT, trueType as properties of the
Windows font engine, make it a real Q_OBJECT.
- Query properties in the Windows print engine and use the HFONT,
LOGFONT there.
Change-Id: I5c35275b32ef6580d7fa15ed83c6e79e33dc3334
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Name is about mimetype names, while FileName is about, well, file names.
Task-number: QTBUG-25748
Change-Id: I34a9ac1a5fc06dc3e3855365e19c4dc7a1aa2671
Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
QML properties marked internal were still appearing in the
the HTML output. Also, the title for QML type pages was not
correct in the help project writer.
Change-Id: Icaad7cefce77a4af70796bc185c99a3035fb17c8
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
The auto-generated ditamap used titles like "articles", this now becomes
"Articles".
Change-Id: I32fa6353443aaa66cbfc2b2fea1fea26e3e33684
Reviewed-by: Martin Smith <martin.smith@nokia.com>
There were still a few places where qdoc
generated "element" instead of "type" or
"class" instead of "type." These have been
fixed.
Change-Id: Id75156810212edb468198b6f269e3a91c55ac22c
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
This completes the transition from connectNotify(const char *) and
disconnectNotify(const char *) to the new QMetaMethod-based
functions.
Removed the old connectNotify autotests and renamed the
connectNotifyMethodXXX autotests to connectNotify, since there is
no longer any ambiguity about which overload is being tested.
Change-Id: Icf108a80177155f21bb73c165fb8ab5d4e997bc2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Changing the encoding used by filenames separately from the locale
encoding is a broken concept and cannot work properly. This creates
ambiguity depending on the data source and how it's being treated.
Instead, enforce that the locale encoding is the only possibility to
deal with file names.
The QFile::encodeName and decodeName functions are retained due to the
Mac-specific issues and due to the sheer number of current
uses. There's no point in deprecating them and moving away from them.
Change-Id: Iedb2d8715d166a59a824f05bc11d107fd44f9c17
Discussed-on: http://lists.qt-project.org/pipermail/development/2012-May/003782.html
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The socket engines already implemented this, but it is a good idea
to test it explicitly.
Task-number: QTBUG-25634
Change-Id: Ife3fe09b0119ed435e4055523c553847739a09fe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This needs some build system fixes to let widgets depend on
the platform support library (and be built after it).
Change-Id: I6f5b878971d1002a18e2fd66db4f34ffd0ac939a
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
Based on reviewer comments on
https://codereview.qt-project.org/#change,25992, split
Q_COMPILER_DEFAULT_DELETE_MEMBERS into
Q_COMPILER_DEFAULT_MEMBERS and Q_COMPILER_DELETE_MEMBERS. Clang provides
2 separate feature checks for these, all other compilers always define
both.
Keep the Q_COMPILER_DEFAULT_DELETE_MEMBERS define, though, for any
existing code that may be using it.
Change-Id: I8969e10989c776a822da153152cfecb99dda8cb9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This prevents http POST/PUT from hanging if the QIODevice being uploaded
returns -1 from read.
Task-number: QTBUG-24738
Change-Id: I76500cc4f0101cc8e5da5f1dc105508b3f519a3c
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
qmake -set can be used instead to set a the default cross compile.
device_config.prf already contains code to read this default.
Remove per-spec CROSS_COMPILE checks
Introduce deviceSanityCheckCompiler() usage where appropriate
Done-with: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Change-Id: I07c75c9e933dc1174a1bf8bf523b6b4a6b427408
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@kdab.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Add an API for use by declarative that allows searching for a
symbol that has been loaded, without opening a specific library.
This makes it possible for declarative to determine if the
profiling library has been preloaded, and to call functions on
it that enable / disable / save the current profile.
Change-Id: I2ec12d9babea2a152990c19735e98d4d7c10a062
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
MinGW installations on case-sensitive filesystems expect
lowercase names of include-libraries and (usually) include
files.
When crosscompiling on Debian 6 (targeting MS Windows) linking
fails because mingw is looking for non-existent include-libraries.
Using lowercase names solves this.
Change-Id: Id3454f4ed8ba42b6ea93d65d9c0ce567db6712df
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>