summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Refactor plugin loading for WinRTMaurice Kalinowski2013-11-055-2/+46
| | | | | | | | | | | | | | | | | Specify the root directory to be the package root. Only plugins inside the root can be opened (actually also only files). Furthermore current defaults to the package root now, which in most cases is identical to previous behavior. When attempting to load a plugin the path can either be specified in host format "C:/..." or as plugin absolute "/platforms/...". Check for both, with preference of latter case, like when qt.conf is used with / being used as plugin path. Change-Id: I7e3da293362488b62a3357c4882ebf5e048dcf95 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT compatibility functions: properly return ERANGE from getenvAndrew Knight2013-11-041-1/+1
| | | | | | | ...when the buffer's size is smaller than the value size. Change-Id: Id345982c9fc4ceed6505d0c192680c47c554fcb4 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Ignore debugger arguments on WinRTMaurice Kalinowski2013-11-011-0/+4
| | | | | | | | | Visual Studio debuggers send an argument to specify the debugger port. This argument needs to be skipped while parsing and not to be interpreted as an option or test function. Change-Id: I24efb52fbd668a7bc3388c876f5ea0d950de1d5b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
* QThreadPool: fix race at time of thread expiry.David Faure2013-10-312-18/+13
| | | | | | | | | | | | | | | | | | | | The current synchronization mechanism was racy: decrementing waitingThreads and then hoping that the wakeOne will wake a thread before its expiry timeout happens. In other words, on timeout, a just-assigned task would never run. And then no other task would run, if maxThreadCount is reached. Fixed by using a queue of waiting threads (rather than just a count), and by moving the wait condition into the thread itself, so we know precisely which one we're waking up, and we can remove it from the set of waiting threads before waking it up, and therefore it can determine on wakeup whether it has work to do (caller removed it from the queue) or it expired (it's still in the queue). This is reliable, whereas the return value from QWaitCondition::wait isn't reliable, when the main thread has already decided that this thread has work to do. Task-number: QTBUG-3786 Change-Id: I1eac5d6c309daed7f483ac7a8074297bfda6ee32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPlainTextEdit: use QSignalBlockerMarc Mutz2013-10-301-9/+13
| | | | | Change-Id: I581e60c4efd985fb909614459229806185f9501c Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QMenu: use QSignalBlockerMarc Mutz2013-10-301-2/+2
| | | | | Change-Id: I41006d2b6f1454382b8c0bede20999d882b66f26 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QFontComboBox: use QSignalBlockerMarc Mutz2013-10-301-3/+4
| | | | | Change-Id: I6a9eab39088275427e4282ee590fda439b2f2901 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QTreeWidget: use QSignalBlockerMarc Mutz2013-10-301-3/+2
| | | | | | Change-Id: I0b69cd5680dfae6349bd4a952f358fe0b4acb2ff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QInputDialog: use QSignalBlockerMarc Mutz2013-10-301-4/+5
| | | | | Change-Id: I711dbc0c35bc51ad3149e3d7b41e716bc9ab94b5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QPrintPreviewWidget: use QSignalBlockerMarc Mutz2013-10-301-3/+4
| | | | | Change-Id: Ic2d48c8e2c9c3c6f06e67ebf7e12bd4899b421aa Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QTabWidget: use QSignalBlockerMarc Mutz2013-10-301-2/+1
| | | | | Change-Id: I4621e6b504c531903210242cf0f1cf12e7538784 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QMdiArea: use QSignalBlockerMarc Mutz2013-10-301-2/+1
| | | | | Change-Id: I54bb64531b1b9639bec163a96baae67b9cabd16b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QDockAreaLayout: use QSignalBlockerMarc Mutz2013-10-301-3/+1
| | | | | | | | | | This change changes the point where signals are unblocked again in QDockAreaLayoutInfo::updateTabBar() to include the final tabBar->count() call. This should not be a problem, as count() is a const function and thus shouldn't emit any signals. Change-Id: I6f3dc5696a9c31db51fbe4cdee4b9d83ddeaf61f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QDateTimeEdit: use QSignalBlockerMarc Mutz2013-10-301-7/+3
| | | | | Change-Id: I4983e96a51220f40644d202d76e92a889ae9431a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QAbstractSpinBox: use QSignalBlockerMarc Mutz2013-10-301-4/+2
| | | | | | | | | | This change changes the point where signals are unblocked again in QAbstractSpinBoxPrivate::updateEdit() to include the final update() call. This should not be a problem, as update() merely posts an event and shouldn't emit any signals. Change-Id: I4b2ae109f057792b573ad6ea168ca77c18c773d0 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QFontDialog: use QSignalBlockerMarc Mutz2013-10-301-4/+2
| | | | | Change-Id: I7be3ac4a7e6988d768e1db68f10a6920aa825a76 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QFileDialog: use QSignalBlockerMarc Mutz2013-10-301-2/+1
| | | | | Change-Id: I32a631493138a777458557232da084f497adc526 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QColorDialog: use QSignalBlockerMarc Mutz2013-10-301-3/+1
| | | | | Change-Id: Id680d9b934760cdd6a20579518199bd388b56e5d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QItemSelectionModel: use QSignalBlockerMarc Mutz2013-10-301-2/+1
| | | | | Change-Id: Ib88db7516fd7dd8f10a86444c506f3294948e79b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QSignalBlocker: (new) RAII class for QObject::blockSignals()Marc Mutz2013-10-302-0/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | I don't think I ever worked on a project of non-trivial size that didn't at some point add a QSignalBlocker. This commit adds code, tests and documentation. Later commits will convert naked blockSignals() calls to use QSignalBlocker. The implementation is purely inline to avoid the heavy overhead of cross-dll function calls for this miniscule task. This should not be a problem because QSignalBlocker only uses public API and a pattern that we anyway need to keep working until Qt 6, at least, so even changing the implementation later will be no problem as the old implementation lurking in non-recompiled code will be acceptable, too. This implementation is an evolution from KDTools' KDSignalBlocker, with the following changes: - Implements unblock() and reblock() - Uses the return value of blockSignals() instead of a separate signalsBlocked() call. Change-Id: I1933dfd72a0f5190324be377cfca3c54cf3d6828 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Doc: update the documentation of QStandardPaths to be more thoroughThiago Macieira2013-10-291-20/+178
| | | | | | | | | | Specifically, note what paths can be empty and which ones can't (modulo system mis-configuration, like an empty $HOME var) and describe what implications there are for application-specific paths and for global (user) paths. Change-Id: If6c11aab466ba50f3a9685dce52dd51b86426f27 Reviewed-by: David Faure <david.faure@kdab.com>
* added QAbstractSpinBox::setGroupSeparatorShown function.Oto Magaldadze2013-10-294-8/+40
| | | | | | | | | | | [ChangeLog][QtWidgets][QAbstractSpinBox] QTBUG-5142 - This will allow a group (thousand) separator to be shown in QSpinBox and QDoubleSpinBox widgets. Task-number: QTBUG-5142 Change-Id: I2e23f5f83c93bb092a2dbd784e06d17d40d42909 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QLCDNumber: remove unused header #includeMarc Mutz2013-10-291-1/+0
| | | | | Change-Id: Ic1608a11a48c373b7ad816c1305cce0fe236425b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Improve mapping between Font Config and Qt font attributesRoger Maclean2013-10-271-17/+50
| | | | | | | | | | | | | | | | | | | | | | | It was sometimes impossible to select the desired font due to the code completely ignoring the FC_WIDTH attribute and poor mapping of the FC_WEIGHT attribute. The result was that it was easy to have a font file that was inaccessible by Qt since it shared attributes with another font file. The FC_WIDTH attribute is now fetched and used unchanged as the font's stretch value other than ensuring it is within the allowed range. For FC_WEIGHT, the code no longer matches the value with the closest QFont::Weight enum but instead does a piecewise linear mapping so that Qt enum values match Font Config ones to the extent possible. Also removed bogus call to fetch the width that was doing nothing with it. Change-Id: Id39715f14a617c1d0e00ecf5a7d391cab99adc03 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Add support for BB10 input method frameworkRoger Maclean2013-10-2511-920/+779
| | | | | | | | | | | | | | | | | | | | | | | | | Added input method support for the BB10 variant of Qt to the extent possible using standard Qt APIs. This adds support for text predictions and entry of languages such as Chinese. Change in interface to QQnxAbstractVirtualKeyboard was made because it is felt the new one is slightly nicer. It doesn't appear safe to assume the focus object has a particular property and in fact in my tests the code failed to work. In some cases the code uses variable and function naming at odds with normal Qt coding standards. This has been done for functions called and data provided by the BB10 input system as for those of us who need to maintain such things, it makes their meaning considerably clearer. While qqnxinputcontext_imf.cpp was used as an initial base for development one can consider the new version as largely new code. I don't believe the original version was ever complete and in any event would not compile. Change-Id: I09470801ffa237cee67da40c0b3d02ed5c77531e Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Introduce QTextDocument::baseUrlJ-P Nurmi2013-10-253-24/+65
| | | | | | | | | Required for QQuickText & friends to implement image resource handling in a clean way - to get rid of QQuickTextDocumentWithImageResources and eventually make QQuickTextEdit's document interchangeable. Change-Id: I97314a6c3e2d5726539d5722795a472631388cb0 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-10-24170-1057/+2586
|\ | | | | | | Change-Id: Ie56539b2e0be611a363b5f15ae5412a78d6945a2
| * Reserve some space for future use in QLoggingCategoryKai Koehne2013-10-242-1/+8
| | | | | | | | | | | | | | | | | | Currently Qt offers only debug, warning, critical message types for general use. Most logging frameworks offer more ... let's save some space for future message types. Change-Id: Icb4333da5c8f5277fd10d8a01b06d95369662bdc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Remove doc references to non-existing functions in QSurfaceFormatSean Harmer2013-10-241-2/+2
| | | | | | | | | | | | Change-Id: I5a9de5b719e111e47a1ea7334609695f1db6149a Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * BlackBerry: improve BPS event lifetime managementJonathan Hoffmann2013-10-232-4/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QEventDispatcherBlackberry::select(), if an event handler called through filterEvent() starts a nested event loop by creating a new QEventLoop, we will recursively enter the select() method again. However, each time bps_get_event() is called, it destroys the last event it handed out before returning the next event. We don't want it to destroy the event that triggered the nested event loop, since there may still be more handlers that need to get that event, once the nested event loop is done and control returns to the outer event loop. So we move an event to a holding channel, which takes ownership of the event. Putting the event on our own channel allows us to manage when it is destroyed, keeping it alive until we know we are done with it. Each recursive call of this function needs to have it's own holding channel, since a channel is a queue, not a stack. However, a recursive call into the select() method happens very rarely compared to the many times this method is called. We don't want to create a holding channel for each time this method is called, only when it is called recursively. Thus we have the instance variable d->holding_channel to use in the common case. We keep track of recursive calls with d->loop_level. If we are in a recursive call, then we create a new holding channel for this run. Change-Id: Ib3584676d2db5a9a3754a1535d5fb6c9e14f5dbb Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * Windows: Handle WM_SYSCOLORCHANGE as theme change.Friedemann Kleint2013-10-231-0/+3
| | | | | | | | | | | | | | Task-number: QTBUG-34170 Change-Id: I6ca11ab67c1e2752300fc167fb8f3c4f0d9ae2b8 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * Fix crash in QXcbDrag.Friedemann Kleint2013-10-231-1/+1
| | | | | | | | | | | | | | | | | | handleStatus() was called with drag==0 when releasing the mouse over the desktop. Task-number: QTBUG-33920 Change-Id: I553647d1e734934b7c6caf4c984683cff88f9162 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Fix typo in check for MINGW_W64 versionKai Koehne2013-10-231-1/+1
| | | | | | | | | | | | | | | | Got introduced in 9b187bcd6a256b53cc2fb85500 Change-Id: I1d713f8309d3d8568ea836cc1d29f9dca685ac01 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Doc: Added a link to the Qt Quick Test pageVenu2013-10-231-0/+1
| | | | | | | | | | | | | | Task-number: QTBUG-33316 Change-Id: Ib8c479837cac4b7cca47b979cbb2dad0aaae6412 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
| * QFileDialog can delete files too, not just directoriesShawn Rutledge2013-10-231-0/+2
| | | | | | | | | | | | | | | | | | After Ic12de12ec51c20de52d040514e90be5e783add43 this functionality was broken. Added an autotest. Task-number: QTBUG-34159 Change-Id: I8f41b7073dc57fea855ab87796f09e8a91520d13 Reviewed-by: David Faure <david.faure@kdab.com>
| * Don't crash if the platform plugin is not initializedBogDan Vatra2013-10-231-0/+3
| | | | | | | | | | Change-Id: I999411816192edbd2bf40c6bda92d6e94fb3d1b0 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
| * Fix deploy mechanism.BogDan Vatra2013-10-231-2/+2
| | | | | | | | | | | | | | | | | | The order of "android:value" and "android:name" attributes can be changed when saving the XML document. Use placeholders instead. Change-Id: I9a97bb0df2d2d16c8a9443a21ce7d3290e0ab466 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
| * Move untranslatable stings to AndroidManifest.xmlBogDan Vatra2013-10-233-13/+8
| | | | | | | | | | | | | | strings.xml file is used to store strings that can/should be internationalized. Change-Id: I2fc305b6917752e9f502bd4beb172205ba4f9fba Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Rely on isLayered() to decide layeringGunnar Sletta2013-10-231-2/+3
| | | | | | | | | | | | | | | | | | The logic here was a bit broken. Every QWindow has an opacity which is 1 by default so the expose was hit for every single window, regardless of it being layered or not. Change-Id: I04873cd5db1cd147708e7de140f5947d3a01e9e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Fix misaligned selection region with text when centeredJonathan Liu2013-10-231-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | If the text is centered, the x/y position in the selection QRectF may be a multiple of 0.5 which is rounded up. This rounding causes misalignment of the selection region with the text. The alignment is fixed by using qFloor on the x and y components. Task-number: QTBUG-34218 Task-number: QTBUG-34234 Change-Id: I4f2fadeb38602f62a93773c6e5faecf03b28069f Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Android/LinuxFb: fix QWidget::showFullScreen()Paul Olav Tvete2013-10-232-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, showFullScreen() had a race condition: it depended on QFbScreen::setGeometry() being called after the window state was set (that would trigger QPlatformScreen::resizeMaximizedWindows(), which was the only part of the code that reacted to WindowFullScreen). On Android this caused random behaviour. Task-number: QTBUG-33294 Change-Id: I228e6af4139af1a47387e7d80757d7b46e859580 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Android: Make platform menu more robustPaul Olav Tvete2013-10-231-3/+5
| | | | | | | | | | | | | | | | | | Don't crash and lock up the whole device when people try to remove menu items that don't exist. Task-number: QTBUG-34246 Change-Id: I4396d252c5af93e021c9e218dbab7c0e7f190d9d Reviewed-by: BogDan Vatra <bogdan@kde.org>
| * QTextHtmlParser: restore the default link color from app paletteJ-P Nurmi2013-10-231-2/+2
| | | | | | | | | | | | | | | | | | | | The default link color used to be resolved to the link color of the application palette, but got lost during the Qt 5 modularization (see commits 7351a43 and 3f9a7f9). Task-number: QTBUG-28998 Change-Id: I7f07427f6c03f83c557100938ad9f7a39349d303 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Fix compilation with latest MinGW-w64 (release 3)Kai Koehne2013-10-221-1/+3
| | | | | | | | | | | | | | Now that MinGW-w64 fixed the headers the old hack actually break stuff. Change-Id: I1f60b9176982f6c07e01f3960bc1d7e70d7f9481 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Better QWindowContainer by not relying on native widgets.Gunnar Sletta2013-10-224-23/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | We change the behavior slightly from the initial implementation in 5.1. Forcing the use of native child widgets is causing massive performance issues so instead, we attach the embedded QWindow directly to the root window. The only exception is QScrollArea and QMdiArea which still enforces native windows for the entire parent chain to make clipping and stacking work. Task-number: QTBUG-34138 Change-Id: If713637bd4dce630552ace2f8ad6b2e86c063721 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Doc: Add missing \since 5.2 to QSizePolicy::retainSizeWhenHiddenMarcel Krems2013-10-221-0/+2
| | | | | | | | | | Change-Id: I461e8187810e564e06869df86b23cc40aeba72bd Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| * Fix Q_ASSERT(!channels[0].isSocketBusy());v5.2.0-beta1Allan Sandfeld Jensen2013-10-213-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit f30641a7 is has been possible to issue more than one host lookup request per HttpNetworkConnection. If the result was both an IPv4 and IPv6 address, and we get a second similar DNS reply, we end up triggering the assert in startNetworkLayerStateLookup(). This patch splits the InProgress state to HostLookupPending and the state of trying both IPv4 and IPv6. This makes it possible to ignore any new DNS replies received after the first succesfull one. Change-Id: I0b8d6b1582fdaed69dde5926019b60bb0cbd580d Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * Doc: Update, and reduce duplication of, QThread-related infoSze Howe Koh2013-10-212-39/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added/Changed: - Move content from the Thread Basics overview to the QThread class ref - Rephrase bits for clarity - Use more links Removed: - (threads-basics.qdoc) Warning against moveToThread(this): This usage came about when people tried to add slots to a QThread subclass. This patch adds a warning against the root cause. - (threads-basics.qdoc) Note on sleep() et al.: They were made public in Qt 5.0. - (threads-basics.qdoc) The strategy for managing member variables: Sounds error-prone. Pushing results through signals is safer. - (qthread.cpp) The note about GUI classes: Irrelevant to QThread, and it's already mentioned elsewhere. Change-Id: I6bc53cc22b929523f9976d2b920f94c02bd7273e Reviewed-by: Geir Vattekar <geir.vattekar@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Use QByteArrayLiteral throughout in QOpenGLVertexArrayObjectSean Harmer2013-10-201-8/+8
| | | | | | | | | | Change-Id: Ia362ead0ffdc077bd0db5d980c80464838c934ea Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>