summaryrefslogtreecommitdiffstats
path: root/src/winmain
Commit message (Collapse)AuthorAgeFilesLines
* winrt: Use native threadingAndrew Knight2014-06-251-0/+4
| | | | | | | | | | | | | | | | | Instead of using std::thread, use the WinRT ThreadPool to manage threads. This allows for setting the scheduling priority, and provides a path to enable XAML integration (which requires Qt run on a background thread). QThread::terminate() is still unsupported, and only the winmain thread can be adopted due to the behavior of the thread pool when creating tasks from the GUI thread. The associated tests are now skipped, and all other QThread tests pass. Task-number: QTBUG-31397 Change-Id: Ib512a328412e1dffecdc836bc39de3ccd37afa13 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-06-051-4/+5
|\ | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt.prf src/plugins/platforms/xcb/qxcbwindow.h src/tools/qdoc/qdocindexfiles.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I214f57b03bc2ff86cf3b7dfe2966168af93a5a67
| * remove HSTRING instancesMaurice Kalinowski2014-06-031-4/+5
| | | | | | | | | | | | | | | | | | | | | | HSTRING needs to be released or handles will be leaked. Instead use HString which takes care of resource management on its own. Task-Number: QTBUG-38115 Change-Id: I2c767776c1f22f45acd8dd77b693f30d63d894b9 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | Windows: Use WinAPI CommandLineToArgvW() to create argv from command line.Friedemann Kleint2014-05-152-12/+40
|/ | | | | | | | | | | | | | | Split the Windows CE/Desktop Windows code paths in winmain. Use CommandLineToArgvW() to obtain argv[] for Desktop Windows. [ChangeLog][QtCore][Windows] Command line parsing on Windows now uses the WinAPI function CommandLineToArgvW() to exactly match the quoting of the command interpreter. Task-number: QTBUG-35432 Task-number: QTBUG-23687 Change-Id: I6743e73649d953497642f7717d3731a83ffda2a2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* WinRT winmain: Pass ImagePath as part of ImageParams in Xap packagesAndrew Knight2014-04-011-2/+17
| | | | | | | | | ImageParams is used to pass arguments to main(), but when used the original argv[0] is dropped. To remedy this, expect argv[1] to contain the same value found in the Xap's ImagePath. Change-Id: I2fb3b9956304fdcdeec4424ea56289d56ad4fe0b Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT: Add debug message handler for winrtrunnerAndrew Knight2014-03-141-0/+25
| | | | | | | | | | By placing debug messages in shared memory, the application can share debug messages with winrtrunner (or any utility which passes -qdevel to the app and opens the corresponding shared memory area). Task-number: QTBUG-37308 Change-Id: Id0e04cfd5f0f701d552a448f780788c7cbf9b438 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT winmain: handle -qdevel parameter for additional debugging toolingAndrew Knight2014-01-301-5/+24
| | | | | | | | | | | This adds an additional command line argument, -qdevel, for tooling support. Since Windows Phone deployment APIs don't return the PID, this writes the PID to a lock file that can be read by deployment tools. Since arguments may be passed from one of several entry points, the special argument checks are now done in Run() instead of onActivated(). Change-Id: Ib3af157ccf687769d43d60adef9a0ab480e835b7 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Replace win32-g++ with mingw scopeKai Koehne2014-01-171-1/+1
| | | | | | | | Commit 773dd01 introduced a general mingw platform scope, which is cleaner and more flexible than matching the spec name. Change-Id: Ie3a9cb791a83f7c8a51bc4e23069190c452ab521 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* WinRT winmain: fix linker error on x86 compilersAndrew Knight2014-01-131-1/+1
| | | | | | | | The x86 PC and Phone emulator compilers choke on WinMain's signature not matching the stdcall exported version. This fixes the issue. Change-Id: I30d8a5dab67f3f1f15869abe2928326e3401dc43 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* WinRT: Properly return exit codeAndrew Knight2014-01-071-2/+6
| | | | | | | | | Instead of returning the HRESULT of the Run method, return the actual exit code of the application. Change-Id: I1e3d654ecdb4c319d4a08fe8a11e8699d186f66b Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* Change entry point for WinRT apps to WinMainMaurice Kalinowski2014-01-062-16/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | Using wmain causes the problem that the linker seems to create some code around it, which calls ExitProcess. That function however is forbidden by the Windows Store Certification process and hence you cannot publish an application currently. This does not apply to Windows Phone, which links in such a way that this problem does not occur there. With WinMain as the entry point this does not happen and also is the default entry point. Testing locally shows that certification goes fine. Since it does not pass the full command line string, the C-runtime method __getmainargs is used instead. This also gives access to any environment strings which may be passed. Note that MSDN states that this function should only be used for desktop applications. For XAML/C++ scenarios there is no entry function at all, but rather the App object gets instantiated in the default template. But this only works for XAML itself and not for plain C++ applications, probably some other entry wrapper is created on the fly here. Done-with: Andrew Knight <andrew.knight@digia.com> Change-Id: I8a118eddf6cfeddeca7d676267e979af17123e02 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-161-5/+4
|\ | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qplatformtheme.h tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp Change-Id: Iecd3343d6a050b8764f78d809c4a1532aeba69e5
| * enable path replacement in installed prl files on all platformsOswald Buddenhagen2013-12-041-6/+4
| | | | | | | | | | | | Task-number: QTBUG-33794 Change-Id: Id0d38715673b8a1c0c034e9c15783eb255c4315b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * properly replace windows paths in installed meta filesOswald Buddenhagen2013-12-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Avoid adding empty argumentsMaurice Kalinowski2013-11-011-5/+7
| | | | | | | | | | | | | | | | QByteArray split does create one item even if the string is empty. Hence check if the launch arguments string needs to be parsed at all. Change-Id: I0a355212aaa7254fe0f417c61a59c30223311915 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | WinRT winmain: enable debugger waitingAndrew Knight2013-10-041-1/+9
|/ | | | | | | | | | | | WinRT applications are not invoked directly, so a debugger may attach too late to be useful. While the application can be launched with a debugging server, attaching directly to the running process is simpler and less resource-intensive. For this reason, it is useful for applications to wait for the direct debugger to attach. If the existing -qdebug parameter is passed to the application, wait idly until the debugger attaches. Change-Id: I7b4957beb9728ab6311b459e4d809dc5f4767780 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* winmain for winrtAndrew Knight2013-09-142-1/+156
| | | | | | | | | | | | | WinRT passes the executable and Appx server info to the CRT main, and supports several additional activation arguments as well. This handles the arguments passed to main as well as the case where a modern app is launched from an external application (e.g. Qt Creator). Task-number: QTBUG-30198 Change-Id: Ia843e98c7843d5705f5f6d1c809de0b6bcdb5d26 Done-with: Kamil Trzcinski Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* fix path adjustments in installed metafilesMark Brand2013-01-301-0/+6
| | | | | | Task-number: QTBUG-28902 Change-Id: Ia70da8f0f0b7abb4ea2a46cb4068c0827888b322 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* remove some unnecessary CONFIG additionsOswald Buddenhagen2012-12-171-1/+1
| | | | | | | | qt is already added by spec_pre.prf, warn_on and depend_includepath by default_pre.prf. Change-Id: Ic00e0ba496d698ed9659c476f2ca99fc0f86a093 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* let winmain just use qtcoreOswald Buddenhagen2012-11-021-3/+1
| | | | | | | | this is correct dependency-wise (anything which links to this needs to link qtcore), and just cleaner. Change-Id: I2c49d16fc8a0ee8bc55a3c165993fd1c4e313dab Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove pointless messing with CONFIG+=fix_output_dirsOswald Buddenhagen2012-11-021-1/+0
| | | | | | | | the function is automatically performed by debug_and_release.prf, regardless what we do with this flag. Change-Id: Iddec69b35e0e905fdf4133ee240af37d3a8ada0b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove explicit load(qt_build_config)s from the librariesOswald Buddenhagen2012-10-191-2/+0
| | | | | | | .qmake.conf (and previously .qmake.cache) already does that for us. Change-Id: I06cc01fa45921d7bd66dda7a0f88729faeff37bd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-6/+6
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* remove mentions of borland from project filesOswald Buddenhagen2012-09-191-1/+1
| | | | | Change-Id: I3049b24ae287bee50aca1de06664a2309df69edf Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Revert "Use true and false in preference to TRUE and FALSE"Sergio Ahumada2012-09-071-1/+1
| | | | | | | | | | | Even though I really think the change was the right thing to do, it seems like Windows people don't like this change because of some Windows Data Types specific rules. This reverts parts of the commit 56d5c909af6473be64a1ae487b45bd444a9a8553. Change-Id: I2c67d9b1bab36fc63937ef386aef56d2a4472a04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Use true and false in preference to TRUE and FALSESergio Ahumada2012-09-051-1/+1
| | | | | | | | The TRUE and FALSE macros are obsolete and should be replaced with true and false (all lower case) respectively. Change-Id: Iee352e8173500683e6319be0abbf5bacf29016e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* fix misnomer: qt_module.prf => qt_build_config.prfOswald Buddenhagen2012-06-191-1/+1
| | | | | | qt_module suggests to be congruent to qt_plugin. Change-Id: I629530bcbe2ba6c0adbdc11a275119c8aff0c953
* don't use qt_module_config for winmainOswald Buddenhagen2012-06-191-20/+28
| | | | | | | it is not really a Qt module, and pretending causes some messups. Change-Id: Id0980f7c00d6d176dd4937f8b265b8b571aa1277 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix tabs/whitespacesYuchen Deng2012-05-031-9/+7
| | | | | Change-Id: I4db24b703c69ce99f529c84248d9fe4a19a60a03 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* MSVC: Fix link warning if ship qt library without pdb filesYuchen Deng2012-05-031-0/+5
| | | | | | | | | qtmaind.lib(qtmain_win.obj):-1: warning: LNK4099: PDB 'vc100.pdb' was not found with 'qtmaind.lib(qtmain_win.obj)'; linking object as if no debug info Change-Id: I5d515a240e917f5747ec8ca7dabde1cd1a1b14de Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* replace uses of QMAKE_INCDIR_QT and QMAKE_LIBDIR_QT with module-specific ↵Oswald Buddenhagen2012-03-081-2/+2
| | | | | | | variables Change-Id: Id410887fa97f345a229e0cbf395633ccf303fa2f Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Windows: fixed qtmain.lib not going to `lib' directoryRohan McGovern2011-07-261-1/+1
| | | | | | | | | | `load(qt_module_config)' clobbers DESTDIR. Rearrange the order so that our setting of DESTDIR works as intended. Change-Id: Id6f02e9fb55069fae9b2a75c9d0f51578b84f4d1 Reviewed-on: http://codereview.qt.nokia.com/2130 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Moved common module profiles to be feature profiles.axis2011-06-051-1/+1
| | | | | | | | | | This enables external modules to also make use of them without having access to the complete QtBase source code. Change-Id: I056e45cba6c6798b76670b8d238dadb2d9f9c092 Task: QTBUG-19585 Reviewed-on: http://codereview.qt.nokia.com/234 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Initial import from the monolithic Qt.Qt by Nokia2011-04-272-0/+157
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12