When bringing an application back to foreground, args may contain NULL.
These nullptrs should not cause application crashes.
Fixes: QTBUG-75843
Change-Id: I642e3c359216e7706bcb13508399999a51a4fc2d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
1. Removed all Qt header files and make it a pure win32 project because it doesn't use any Qt features.
2. According to MSDN, CommandLineToArgvW is in shellapi.h, so replace ShlObj.h with it.
Change-Id: I3daacb97f34664ac36f8e887a2c31d38f611b16e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Use 'msvc' instead of 'win32-msvc' or even 'win32-mscv*'.
Change-Id: I21dc7748a4019119066aea0a88a29a61827f9429
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
If large debug strings are received, the application should not crash,
but the file mapping's size should be increased accordingly.
To signal the need for a bigger mapping to the client, the new message
type was introduced. If winrtrunner receives a message with this type,
it will close the file mapping so that a new one can be created.
Task-number: QTBUG-61911
Change-Id: I3d5b5770870257a965b80e369975d3869e9a5446
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
When winrtrunner is used to debug winrt applications, debug messages
should be acknowledged by winrtrunner. Otherwise it is possible, that
2 messages are sent (and their event set) before winrtrunner reacted.
In this case the first message was lost and the second message shown
twice.
Change-Id: Ib1c6f87aad0c0da1761be5bf467edf8d4476c5e3
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The code can be accessed from several threads and thus should be
protected.
Change-Id: I38c67c5d0f9b1658da1d0ae45d3ea79bbe4e8dff
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
On Windows (Phone) 8.1 __getmainargs was still supported and used
to do the initialization of the application's parameters and
environment. When that functionality was removed together with the
now unsupported OSs,the initial filling of argc, argv, and env part
was forgotten.
Change-Id: I3b788de317b22b4525427faefc3fe974dac5d9ac
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Although WinRT doesn't officially support argc/argv, respect C++03
§3.6.1/2 (The value of argv[argc] shall be 0).
Task-number: QTCREATORBUG-19705
Change-Id: I190e2923b8a0665cc8975a800619fd916a4dd244
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
These options are used by winrtrunner/Qt Creator to control logging
and debugging behavior and should not influence applications.
Without this change applications that use
QCommandLineParser::process have to explicitly remove these values
from the arguments list or the application will exit with an
"unknown option" error when run from Qt Creator.
As winrt applications do not natively support command line arguments,
breaking the use case of having these values as valid command line
options is acceptable.
[ChangeLog][qtmain][winrt] -qdevel and -qdebug are removed from the
command line arguments and not passed to the application.
Change-Id: I60e5565148fd3dd0155b946607fdf5042139d2e1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Remaining uses of Q_NULLPTR are in:
src/corelib/global/qcompilerdetection.h
(definition and documentation of Q_NULLPTR)
tests/manual/qcursor/qcursorhighdpi/main.cpp
(a test executable compilable both under Qt4 and Qt5)
Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Remaining uses of Q_DECL_OVERRIDE are in:
src/corelib/global/qcompilerdetection.h
src/corelib/global/qglobal.cpp
doc/global/qt-cpp-defines.qdocconf
(definition and documentation of Q_DECL_OVERRIDE)
tests/manual/qcursor/qcursorhighdpi/main.cpp
(a test executable compilable both under Qt4 and Qt5)
Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The last use of qWinMain was removed in commit
390598cb43, "Winmain: Remove Windows CE."
It used to be used on non-WinCE, but that was dropped in commit
9b121e5579.
Change-Id: Idc347fbb462f4122b044fffd1490a210358a61b1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
[ChangeLog][QtBase][General] Removed support for WinRT/Windows Phone 8.1.
Task-number: QTBUG-57288
Change-Id: Ifd6d6780cbbdb710d99556ba3d2fb2e514d4f789
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
5971b88e is not needed in new configure.
This merge also reverts "fix QMAKE_DEFAULT_*DIRS resolution with
apple SDK", 2c9d15d7, because it breaks iOS build with new
configure system.
Conflicts:
mkspecs/features/default_pre.prf
mkspecs/features/mac/toolchain.prf
mkspecs/features/toolchain.prf
src/dbus/qdbusconnection.cpp
src/plugins/sqldrivers/mysql/qsql_mysql.cpp
src/sql/drivers/mysql/qsql_mysql.cpp
src/widgets/widgets/qmenubar.cpp
src/widgets/widgets/qmenubar_p.h
tools/configure/configureapp.cpp
tools/configure/environment.cpp
tools/configure/environment.h
Change-Id: I995533dd334211ebd25912db05b639d6f908aaec
Windows Phone needs to use activation targets to properly handle the
return value of a file dialog. 0f9ca217d0
introduced launching an app via different modes, but broke above use-
case for Windows Phone.
Hence, we first check if a dispatcher exists and use this one to forward
the activation.
Task-number: QTBUG-54342
Change-Id: If9dd2df9a45e9aa104775530c695325fe6f684f2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Use the new qtConfig macro in all pro/pri files.
This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.
Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Conflicts:
qmake/library/qmakebuiltins.cpp
qmake/library/qmakeevaluator.cpp
qmake/library/qmakeevaluator.h
qmake/project.h
QMakeEvaluator:
* evaluateConditional(): one side changed return type, the other
changed a parameter type.
* split_value_list(): one side changed a parameter adjacent to where ...
* expandVariableReferences(): ... the other killed one overload and
changed the survivor
src/corelib/io/qlockfile_unix.cpp
One side changed a #if condition, the other moved NETBSD's part of
what it controlled.
src/corelib/tools/qdatetime.cpp
One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the
other moved it from the private class to the public one, in the midst
of the "short date-time" optimization, which confused diff entirely.
One side changed a QStringLiteral to QLatin1String, the other rewrote
adjoining code.
src/network/kernel/qauthenticator.cpp
Both rewrote a line, equivalently; kept the dev version.
src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
One side changed #if-ery that the other removed.
tools/configure/configureapp.cpp
One side added a check to -target parsing; the other killed -target.
tests/auto/testlib/selftests/expected_cmptest.lightxml
tests/auto/testlib/selftests/expected_cmptest.teamcity
tests/auto/testlib/selftests/expected_cmptest.txt
tests/auto/testlib/selftests/expected_cmptest.xml
tests/auto/testlib/selftests/expected_cmptest.xunitxml
Regenerated using generate_expected_output.py
I note that quite a few other expected_* come out changed, now.
There was no git-conflict in
src/widgets/kernel/qformlayout.cpp
but it didn't compile; one side removed some unused methods; the other
found uses for one of them. Put FixedColumnMatrix<>::removeRow(int)
back for its new user.
Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
Replace it with QL1S in QStringBuilder expressions
and in overloaded functions.
Replace patterns 'QString::number() + QStringLiteral'
and 'QStringLiteral + QString::number()' with
QString::asprintf.
Saves some text size.
Change-Id: Ib39b2332264dfc3df04e77f2c101b47a1030cef4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
don't pretend that these two flags can be set separately - the
configures set them in tandem.
Change-Id: Ib0beae0152de09026d4627fd3ae0feabd9ce1b81
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Port the last remaining Q_FOREACH (over a QVarLengthArray,
no less) in winmain to C++11 range-for and mark the library
as Q_FOREACH-free, using QT_NO_FOREACH.
Change-Id: Ic561080f7dd61d1d853ceb9e211c9b8a23bf05a5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Besides launching a WinRT application it can also be activated, for
instance via an uri protocol, as a share target or file open event. In
those cases we need to resume the main thread, which only happened for
regular launches so far.
In addition we create and post an activation event, which can be caught
from the user application. However this requires a QCoreApplication
object to be created from the main thread, hence try to query the
eventdispatcher with a timeout.
Task-number: QTBUG-49276
Change-Id: I4ceca59dd3b062d9a5e49d1ad80334360aafbd6f
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Update files using old header.LGPL3 to header.LGPL
Update files using old FDL template to use new one
Update files using old BSD template to use new one
Change-Id: I36a78272516f9953d02956522f285b40adfc8915
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Windows 10 requires apps to handle the PrelaunchActivated property. This
enables a faster startup by launching an app and immediately suspending
it. This happens by the system and at the time the user launches the app
no library loading or initialization is required.
By default we opt-out of this and return early. The reason is that we
cannot know the type of application written in Qt and whether it breaks
the guidelines by using prelaunch. For further details check here:
https://msdn.microsoft.com/en-us/library/windows/apps/mt593297.aspx
Task-number: QTBUG-50292
Change-Id: I4d0b0b95a03f93b99211d042895404a88ea7cb9d
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
"-ServerName:" is only used for Visual Studio and causes bad side-
effects when using QCommandLineParser.
Change-Id: Ifef652bbb65df9279a39ae3c74ddbb563c87bd90
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Recent changes to the main file accidently removed the
parameter from the call.
Change-Id: I4cce48327d43d9ea3fe4fd82c2f5768aa4bc6d5c
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
We have to call Exit() to successfully close an application as done in
25dcc90d79. Unfortunately Exit() always
sets the exit code to 1 and this cannot be changed programmatically.
Hence write the exit code into the pid file which is created when
launched via winrtrunner. winrtrunner then fetches the content and
passes the exit code to its callee. This implies that the pidFile is
not deleted by the app itself anymore.
Task-number: QTBUG-38654
Change-Id: Ib9b6ae4a0d61c9bf7e530e984aae3ad6204c39a0
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
After returning from main() it is not sufficient to exit the main
thread, it also needs to be ensured that the Xaml::IApplication object
gets notified by invoking Exit.
Task-number: QTBUG-49141
Change-Id: I8ca434be5f17ddddd465ede2a79585c28c51b3ef
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
This will allow application main to go out of scope and free objects
allocated there.
Change-Id: I7b7199ecf67afe578bac043f16b064c9daaae04a
Task-Id: QTBUG-48760
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Support picking file(s), folder and save file via native component on
Windows Phone.
Task-Id: QTBUG-44833
Change-Id: Ibffc1cf3c133c9fbf9c92e0a4f874c4e197c50ee
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This allows the platform plugin to start using XAML interfaces in the
windowing system.
Change-Id: Ifcd29b8b8d83b138af69786dfc6a1adec21be37e
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Since of Windows (Phone) 8.1 most of the desktop's thread functionality
is also available, so we might be able to share the code and get rid of
the extra implementation for WinRT.
Task-number: QTBUG-43837
Change-Id: I0ce907cd94899834527f88c70e1e395bafdb14b3
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
The Windows 10 CRT does not export __getmainargs(), so we need to move
to GetCommandLine like on WinCE and desktop Windows. As CommandLineToArgv
is not available, the command line is split according by spaces, allowing
for quotes (and quote escaping) around arguments.
Change-Id: Ibc969df94ca5423a3a71d8190bbacd201189ea19
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
When passing Qt arguments followed by normal arguments,
a double deletion may occur due to Qt shifting argv.
For example:
argv[] = app -qwindowgeometry +50+50 some_arg <null>
becomes:
argv[] = app some_arg <null> some_arg <null>
Terminate deletion when encountering the null pointer.
Change-Id: I5279955b6bd463f5858d6e5e8e16a1f5d0945652
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>