summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Reserve a virtual method for use with a feature in Qt 5.1.Stephen Kelly2012-03-202-0/+12
| | | | | | | | | | 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>
* Forward declare QMetaObject as a struct.Stephen Kelly2012-03-201-1/+1
| | | | | | | Fixes compiler warnings with clang and others. Change-Id: I726d4c10644287bb642c8b5dd28172afe8c4d1ea Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Reserve the virtual viewportSizeHint method in QAbstractScrollArea.Stephen Kelly2012-03-202-0/+12
| | | | | | | | | | 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>
* Add API and reserve space for storing the QMetaObject with the QMetaType.Stephen Kelly2012-03-203-8/+30
| | | | | | | | 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>
* Generate a forwarding header for QStringBuilder.Stephen Kelly2012-03-201-0/+1
| | | | | | | This should fix the declarative build. Change-Id: I32dd5b7783995759f27d016c801ae6dfb3d44733 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QtWidgets: Cleanup Q3* itemsDebao Zhang2012-03-2019-779/+24
| | | | | | | | | 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>
* Add a base class with specialization to QStringBuilder.Stephen Kelly2012-03-191-12/+38
| | | | | | | | 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>
* Fix up the QEventLoopLocker documentation.Stephen Kelly2012-03-191-3/+10
| | | | | Change-Id: If5bf8c2703f094023a614b3efcbd8489560694d9 Reviewed-by: Richard J. Moore <rich@kde.org>
* Remove a dead code from QVariant.Jędrzej Nowacki2012-03-191-9/+26
| | | | | | | Remove some "safety" code, but essentially it was a dead code. Change-Id: Ie19c29d4cce8b72be5dbaca53c03adc63e8c3dc5 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Merge master into api_changesKent Hansen2012-03-1937-97/+383
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp Change-Id: I877256e95f3788e617437f4e9661a88047f38cd6
| * Make copy and assign private for QAccessibleEvent.Frederik Gladhorn2012-03-182-6/+8
| | | | | | | | | | | | | | | | | | 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>
| * Cocoa: Fix function key handlingBradley T. Hughes2012-03-181-7/+11
| | | | | | | | | | | | | | | | | | | | | | 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>
| * Fix shortcut handling in the Cocoa pluginBradley T. Hughes2012-03-181-25/+26
| | | | | | | | | | | | | | | | | | | | | | 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>
| * QPointer: update its document and changes-5.0.0Debao Zhang2012-03-181-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | QPointer has been un-deprecated and one behavior which slightly different from Qt4 has been fixed. see SHA: b8773165d76e0d5d46287d92f9d6bdbbd2110180 and SHA: 497622cafe235eadb5dd5056b196d8451ee89071 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>
| * Add QWindowSystemInterface::tryHandleSynchronousShortcutEvent()Bradley T. Hughes2012-03-172-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Don't reject plugins that have empty meta-dataLincoln Ramsay2012-03-171-2/+1
| | | | | | | | | | | | | | | | | | 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>
| * containers: add C++11-style c{begin,end}() as alias for const{Begin,End}()Marc Mutz2012-03-1718-2/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Replace Q_WS_MAC with Q_OS_MAC in qshortcut.cppBradley T. Hughes2012-03-171-2/+3
| | | | | | | | | | | | | | This re-enables shortcut context matching for menubar actions. Change-Id: I0d9f2b3d4316a4611afe96eb1a2cf29cb9e91851 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
| * QCocoaClipboard: Make QClipboard::clear() clear.Morten Johan Sorvig2012-03-171-0/+4
| | | | | | | | | | Change-Id: Ifb235d015f7831b335a9c3db92515a8d1cd49311 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
| * Fix bug showing folder icons for filesArnt Witteveen2012-03-171-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * qdoc: Structure the DITA map with a root node.Martin Smith2012-03-171-2/+8
| | | | | | | | | | | | | | | | | | | | 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>
| * Fix font cache check in QFontEngineFT::recalcAdvances()Miikka Heikkinen2012-03-161-1/+3
| | | | | | | | | | | | | | | | | | | | Cached font was used regardless of the format, resulting in incorrect advance in some cases when default format differed from the cached format. Task-number: QTBUG-24188 Change-Id: I39e4156bd9ba743afa7e106e934c90227fbf2b8b Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
| * Removed move constructor.Wolf-Michael Bolle2012-03-162-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | All C++-2011-specific constructors, operators and methods may be inline only in Qt. Since an implementation in the header file does not seem to be possible for QMimeType without breaking backward compatiblity the move constructor has to disappear altogether. See also the discussion at http://codereview.qt-project.org/#change,19150 Change-Id: If07347a51a1ae5bd4c2d292dac835592ede4b370 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Removed move constructor.Wolf-Michael Bolle2012-03-161-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | The provided implementation breaks backward compatiblity, and therefore has to disappear altogether. See also the discussion at http://codereview.qt-project.org/#change,19150 Change-Id: Idf6e4a2c4b623458217541485e4aab0837909d66 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Cocoa: Fix menu item activation.Morten Johan Sorvig2012-03-161-1/+1
| | | | | | | | | | | | | | Handle the action message on the application delegate. Change-Id: I23686fd6e936a4dbbb141da3dd04a64cbf6a051a Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
| * Fix broken qWaitForWindowShown() behaviorCharles Yin2012-03-162-4/+55
| | | | | | | | | | | | | | | | | | | | qWaitForWindowShown() should check window->isActive() instead of window->isExposed() and return false if timeout. Add two new qWaitForWindowActive() and qWaitForWindowExposed() functions. Change-Id: Idd9601805c2e84b0d36ddd5471031b627d289953 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * QRegularExpression: various documentation improvements/fixesGiuseppe D'Angelo2012-03-161-11/+28
| | | | | | | | | | Change-Id: I683afb24f888ab6cf3c543fba8cd193a730709af Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* | Ensure that moc doesn't resolve the qreal meta-type idKent Hansen2012-03-182-23/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 f95181c7bb340744a0ce172e8c5a8fcdc2543297 (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>
* | Move CMake macros and tests for dbus tools from qttools.Stephen Kelly2012-03-182-0/+165
| | | | | | | | | | Change-Id: I9d589a2d33eb8fcac63443565bb3e2319be3e04f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Bootstrap qdbuscpp2xml.Stephen Kelly2012-03-183-218/+256
| | | | | | | | | | | | | | | | | | 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>
* | Add qdbuscpp2xml.Stephen Kelly2012-03-182-0/+456
| | | | | | | | | | | | | | | | This is the pristine version from qttools at a0e2b3e96be934438974b175d0e640ed30f4efcb. Change-Id: I38eafde3f4b909bb63988f855672a908cae41d2c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Bootstrap qdbusxml2cppStephen Kelly2012-03-183-12/+47
| | | | | | | | | | Change-Id: I06856b169d5ee4f99fcf9c87ce88cb5ac34568e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add qdbusxml2cpp.Stephen Kelly2012-03-182-0/+1157
| | | | | | | | | | | | | | | | This is the pristine version from qttools at a0e2b3e96be934438974b175d0e640ed30f4efcb. Change-Id: I4dc7c7fd98637cecfc57a9be61063d351b660e72 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Include geometric variants when bootstrapping.Stephen Kelly2012-03-172-2/+4
| | | | | | | | | | | | | | | | 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>
* | Compile QLatin1String with C++11Olivier Goffart2012-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Don't treat QByteArray(0, char) as nullJoão Abecasis2012-03-162-2/+2
| | | | | | | | | | | | | | | | This also changes behavior for negative sizes, but those cases could be viewed as errors on the client side, anyway. Change-Id: I9e56f2ba53b1edcd9f2faa5384c7d77f6823e24a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSharedPointer: add reset() member functionsMarc Mutz2012-03-163-0/+41
| | | | | | | | | | | | | | | | | | | | These have been added for std::shared_ptr compatibility, but in particular to allow tst_qnetworkreply && friends to drop the implicit conversions added to QSP by inheritance, so QSP can become final. Change-Id: I0f0401b02125d65622e52393b40a3b10bd9a850c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix comparison type warning.Stephen Kelly2012-03-161-1/+1
| | | | | | | | | | | | | | Change-Id: I4051c5bc204215f368e4381e508dd870be240f8f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* | Merge master into api_changesKent Hansen2012-03-16363-7434/+48380
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp src/gui/kernel/qplatformsurface_qpa.cpp tests/auto/corelib/tools/qtimeline/qtimeline.pro Change-Id: Iff3fff34eeeb06f02369767ddfce44cfde505178
| * Un-deprecate QPointer per mailing list discussion.Robin Burchell2012-03-152-6/+1
| | | | | | | | | | | | | | | | | | | | Now that QPointer is implemented in an efficient manner, there is really no need to avoid it, deprecating it just adds a large amount of churn. Change-Id: I32116faf14c3b07631d59ba9585f9ce422531646 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Add a note to QTouchEvent docs about empty touchpoint listsLaszlo Agocs2012-03-151-3/+4
| | | | | | | | | | Change-Id: I65e9e3ed2069d9194f5e70fb9731d605e0979e6d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * Fix QUdpSocket bindMode autotest regressionShane2012-03-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | When binding with the DefaultForPlatform bindmode, then don't set options on the socket related to sharability, leave them at the platform default. This restores compatiblity with Qt 4 Change-Id: I612a3acb976f08446b4eef03ccdcdf84b3477c3c Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
| * Add missing private headers to .pri.Xizhi Zhu2012-03-151-0/+1
| | | | | | | | | | Change-Id: I7ba23f23c1e7cb19152f2c0cedec3549ddfb11c9 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
| * Added missing \since 5.0 and tweaked some docs in QtGui.Samuel Rødal2012-03-158-4/+19
| | | | | | | | | | Change-Id: I91564f7a61962f97b9fb78c96d94d5695a3924db Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
| * qdoc: Structure the DITA map with a root node.Martin Smith2012-03-154-85/+41
| | | | | | | | | | | | | | | | | | | | | | The root topicref is now always index.dita, unless there is no index.dita. But there is always a root topicref that has the project name as its navtitle, even if there is no index.dita file to map it to. Task-number: Mzilla bug - 7229 Change-Id: I0c9fdf1a2e3ba847fe8975a0745667189a77a755 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
| * QSqlTableModel::removeRows() enforce edit strategyMark Brand2012-03-151-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For OnFieldChange and OnRowChange, we don't want more than one row in the cache with uncommitted changes. This could happen if deletion in the database fails while other changes are pending. Chosen solution is to return false if other rows have pending changes. Also, we only allow 1 row removed at a time. Updated test, changes and documentation. Change-Id: I68baf6d221789b4754e891535070011c759a2155 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * QSqlTableModel::setData(): no longer autosubmit for OnRowChangeMark Brand2012-03-151-29/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The model can never do a good job of knowing when user moves to a new row in the view. Faking it by detecting when another row is changed was not a good solution because it cannot detect when the last edited row is left. Either the view should automatically submit when the user leaves a row or the application should provide a way to submit. This change made it possible to reuse the logic of flags() in setData(). Change-Id: I2550e5b113bceba1a852fc21203babeca07c5748 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * QSqlTableModel: disallow insert if changes are pendingMark Brand2012-03-151-7/+9
| | | | | | | | | | | | | | | | For OnFieldChange and OnRowChange, inserting rows should not be allowed if there are pending changes in cache. Change-Id: Ia794332959a35a1de87e798ba1a74ace3dfae68f Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * QSqlTableModel::setData()/setRecord(): fix incorrect rowMark Brand2012-03-151-25/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For OnFieldChange and OnRowChange, before submitting new changes, setData() and setRecord() attempt to submit pending changes and revert them upon failure. However, they fail to consider that reverting pending insertions removes rows from the model. As a result, the new change can be applied to a row higher than intended. One possible solution would be to adjust the targetted index for the removed rows, so that the intended row is affected by the new change. But this still causes the strange editing experience as rows jump up just as they are being edited. It does not seem right in the first place for the model to initiate reverting changes. It should be up to the application to decide what to do when data cannot be committed. In particular, setData() and setRecord() should not have the side effect of reverting already pending changes. The chosen solution is simply to refuse new changes that don't make sense for the edit strategy. For OnFieldChange, flag() will indicate read-only when editing is blocked by a pending change. Since setData() and setRecord() submit data immediately for OnFieldChange, it no longer makes sense to resubmit changes automatically before a new change. For OnRowChange, setData() keeps the behavior of automatically submitting a pending row before starting on a new row. This is historical behavior and is probably motivated by the fact that QTableView does not automatically call submit() when editing leaves a row. The obvious shortcoming of this is that the last row to be edited will not be submitted automatically. It also prevents us from flagging rows other than the pending row as read-only. For OnRowChange, setRecord(), being row-oriented by nature, should submit the change immediately rather than waiting for the next call to setRecord(). This makes setRecord() consistent with insertRecord(). Change-Id: Icb4019d8b7c53a7ee48f8121a7a525e8bc35d523 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * Remove Q_WS_X11Frederik Gladhorn2012-03-151-4/+0
| | | | | | | | | | | | | | The define is removed and only added an include. Change-Id: I85090023cb9eb33f83ccc7fe2ab69556b4ff89fb Reviewed-by: Robin Burchell <robin+qt@viroteck.net>