summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Don't hardcode the number 14 in meta-object generatorsKent Hansen2012-02-163-3/+7
| | | | | | | | | | | | | 14 is the number of fields (ints) in the QMetaObjectPrivate struct as of revision 6. Use the calculated number of fields instead, so that the code will still be correct when more fields are added in future revisions. Change-Id: I4f2c2bfc125f3fabc8e8caedf5c6ba6c17a34d06 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* qmetaobjectbuilder: Add asserts to confirm validityKent Hansen2012-02-161-5/+12
| | | | | | | | | | | | | | | | | buildMetaObject() can operate in two "modes", based on whether a buffer to write the meta-object into is passed or not. Add asserts to make sure that the intermediate meta-data indexes are correct in both "modes", and that the final size in "write mode" matches the size that was computed in the preceding non-writing pass. The asserts make it easier to catch obvious problems when changing buildMetaObject() to generate a new meta-object revision. Change-Id: Ief7c74e6f6fca836587e831b06072d6aa98c7193 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Include headers before QT_BEGIN_NAMESPACE.Xizhi Zhu2012-02-162-2/+3
| | | | | Change-Id: Icaef1cb280d2968e4a35c93375749d2d9feff856 Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* Add missing private headers to .pri.Xizhi Zhu2012-02-161-1/+6
| | | | | Change-Id: Ia0f37953124198dce000adad9dfae051925d526e Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* Fix ref counted window close handling.Stephen Kelly2012-02-169-522/+79
| | | | | | | | | | Instead of refcounting QWindow visibility, we ask the Application subclass whether quitting is appropriate. Task-Id: QTBUG-24120 Change-Id: Idd19cc1a3e5742fddded89c7638aaaa5e47c568d Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* bootstrap configure.exe on windowsOswald Buddenhagen2012-02-165-7/+385
| | | | | | | | | it is *ugly* to have the binary in the repository. this adds a few seconds to the windows build, as the configure needs to be rebuilt, obviously. that's almost negligible. Change-Id: I40ffde23b3c3af2b6bab3e78cd0a9f433214b563 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add QMetaType::FirstCoreType enum value.Jędrzej Nowacki2012-02-164-3/+5
| | | | | | | We should not assume that the first type id is 0. Change-Id: I17ba6ba57e97ebd495904bfd11235fe458f214e5 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Add a ThemeChange event.Friedemann Kleint2012-02-168-0/+52
| | | | | | | | | - Pass it from QWindowSystemInterface via QWindow to the widgets. - Add handler code from 4.8 / qapplication_win.cpp to qwidget.cpp. Change-Id: Ic759563aa00cb93fe014c1bf41020446c1927dec Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Move the removal of the Quit event to QWindow.Stephen Kelly2012-02-154-3/+83
| | | | | Change-Id: If524127ba9dab9ef065aaf4079294295eef8e49b Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Make the cmake tests work with a namespace build.Stephen Kelly2012-02-157-0/+14
| | | | | | | Change-Id: I6858c324548373c57963b5ef137772a1f780ec78 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QHeaderView::moveSection performance boostThorbjørn Lund Martsum2012-02-152-245/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | The patch also speeds up swapSections and hideSection a lot. It work by eliminating the Span. (That is forcing each 'Span' to have exactly one element) That saves a lot of loops since we can often lookup info fast - and/or change it fast. Since it is often a complexity change, it is difficult to put %-increase on. (The most used linear function is recalcSectionStartPos() - and it has a very low constant) However comparing with the new benchmark (2500 rows) swapSection, showHideSection and moveSection are about 20-40 factors faster. (Yes, it is a lot faster!) In the benchmark moveSection is about 300 factors faster. Beside being a far better model it is also far more simple. This fix partly solves: Task-number: QTBUG-19092 Change-Id: I8deeb9315276d15c68e8a27d5dcb8e0c0badf367 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix tst_QFileDialog2 for Windows 7.Miikka Heikkinen2012-02-151-9/+35
| | | | | | | | | | | There are no rights for typical user or even administrator to write directly under c:\ root in windows without rights elevation, so completionOnLevelAfterRoot() test case failed. Changed the test case to use an existing directory. Task-number: QTBUG-24289 Change-Id: I6a8dfc9d1d6ae798b3b9049c542b45fdbdbd9a8c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove XFAIL in QGraphicsWidget test for WindowsMiikka Heikkinen2012-02-151-1/+3
| | | | | | | | | The XFAILed initStyleOption() case passes on Windows, so do not XFAIL it there. Task-number: QTBUG-24297 Change-Id: I9615c408aa7e72b5eb8fe9739903594e45eb5fd7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Implement new plugin mechanismLars Knoll2012-02-1517-260/+640
| | | | | | | | | | | | | | moc can now embed meta information about the plugin inside the plugin itself. This information can be queried by Qt without having to load the plugin. Source compatibility with the old plugin loading mechanism is still there, but will be removed before Qt 5.0. Change-Id: I03e4196ddfed07d0fe94acca40d5de8a6ce7f920 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add JSON support to the bootstrap libraryLars Knoll2012-02-156-3/+21
| | | | | | | | | | | The JSON support will get used in moc to support the creation of plugin metadata that's embedded into the plugin itself. Change-Id: I3bc52b16ca0a43bc8bf9141b450045c6183b7823 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add autotest for QMetaMethod introspectionKent Hansen2012-02-153-0/+621
| | | | | | | | | | This autotest checks that meta-methods can be properly inspected (signature, return type, parameter types, etc.). Change-Id: I13dc75ec5123280e94ec738dade3f54e427fdbaa Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Corrected the size of mipmaps in framebuffer objects.Kim Motoyoshi Kalland2012-02-152-4/+4
| | | | | Change-Id: Ia3c0daefc6537b12be7f9072e7defc0631794690 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove a couple of QtGui/QtGui header entriesAndy Shaw2012-02-152-2/+2
| | | | | | | | | | Removed a couple of header entries since they were causing build problems on Mac. Additionally it is a bit much to include QtGui/QtGui in a private header file. Added in an include to QCache and QGradient which was necessary afterwards. Change-Id: I442efc799a4c81b50ec30d58f1aedfb08e686fcb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added support for resetting QOpenGLFramebufferObject attachments.Samuel Rødal2012-02-153-27/+82
| | | | | | | | | | As the documentation says, this can be useful to free or recreate attachments when needed. For example, it might be useful to free stencil and depth attachments to free up resources when not rendering to the framebuffer object. Change-Id: Ib267024fdd380a788c256eb8fb86e0f8832329e0 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Stabilize QFileSystemWatcher test.Friedemann Kleint2012-02-152-35/+69
| | | | | | | | | | | | | | | - Run each test in a temporary directory, avoid writing test files in source/build tree and prevents tests being influenced by left-overs from previous runs and locks of the application on the current directory. - Modify test to be able to use absolute paths to the temporary directory. - Skip parts of test removeFileAndUnWatch if a race condition occurs. Task-number: QTBUG-24029 Change-Id: I215cc2e0fe6f92d2ffe597b01cdc9c9a39e3c5b4 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Various documentation fixes ported from Qt 4.8Teemu Katajisto2012-02-1511-15/+29
| | | | | | | | | | | | | | | | | | Final set of selected documentation fixes for qtbase from Qt 4.8 commit bacae725e584f51ee2fd83af7bef3e4515de9587 Task-number: QTBUG-13362 Task-number: QTBUG-18356 Task-number: QTBUG-18417 Task-number: QTBUG-18664 Task-number: QTBUG-21562 Task-number: QTBUG-22094 Task-number: QTBUG-18741 Task-number: QTBUG-15921 Task-number: QTBUG-15738 Change-Id: I3bd33bb7ce7aa991913ba82f3ea0e4b124f3ee41 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* tst_QVariant passes on Mac OS XBradley T. Hughes2012-02-151-2/+0
| | | | | | | | Do not mark with insignificant_test anymore. Task-number: QTBUG-22747 Change-Id: I4ef6d5d7e1189b03fd1ab812a0839e3709686e1b Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Test template-based connect() with qmetaobjectbuilderKent Hansen2012-02-151-9/+17
| | | | | | | | | | | For template-based connect(), the meta-object is resolved at compile-time (the virtual metaObject() function isn't called). But we can make it work by copying the members of the dynamically constructed meta-object to the statically defined one. Change-Id: Ia4d3263a89008e36e187c584db6d25d9042f32b3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* qmetaobjectbuilder: Add support for revisioned methods and propertiesKent Hansen2012-02-153-4/+157
| | | | | | | | | moc supports it, so qmetaobjectbuilder should too. Change-Id: I01475794e928b5a1b659f0dab044933948186971 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Fix compilation with MinGWJonathan Liu2012-02-153-1/+10
| | | | | | | | | | | | | Some headers and constants are available in MinGW-w64 that are not available in the official MinGW. STATE_SYSTEM_HASPOPUP and STATE_SYSTEM_PROTECTED constants are defined if they are not already defined by including oleacc.h. _CrtSetReportMode is not used and crtdbg.h is not included when using official MinGW as crtdbg.h is missing from official MinGW. Change-Id: Ie7f3f3726a1663d0fdeb6ee17b86873ae3f61860 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fixed typo.Rohan McGovern2012-02-151-1/+1
| | | | | | | | keyboar -> keyboard Change-Id: Ia305237ac92ac5b0d5c8b0d3cc638292238cec02 Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Eliminate duplicate data row names in widgets autotests.Jason McDonald2012-02-1518-149/+152
| | | | | Change-Id: I82bab3cc39320014fac6732c7b60233b262cb30d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QSqlTableModel::indexInQuery(): fix for inserted rowsMark Brand2012-02-151-0/+3
| | | | | | | | Should return invalid QModelIndex since inserted row does not map to query. Change-Id: Ib1d15cf4198a7063717fb3f3b594b2b1d8a54dfe Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* QSqlRelationalTableModelPrivate: simplify field name translationMark Brand2012-02-151-9/+6
| | | | | | | | | | | | It's not appropriate to use indexInQuery() here. First of all, the row might be an inserted row, and thus not be in the query. The intent was probably to get the column position in the query, but this is certainly not row dependent. Furthermore, if there are inserted or removed columns, these are managed within QSqlQueryModel. Change-Id: I89668655b263747a5b849136404112e911722b3d Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* QSqlTableModel::submitAll(): avoid resubmiting successful changesMark Brand2012-02-152-2/+20
| | | | | | | | | | | | | | Consider what happens the 1st change succeeds and the 2nd fails. No select will be done. When submitAll() is called again, the 1st will still seem to be pending. It will fail or have unexpected effects if the primary values were changed. The solution is to avoid resubmitting successful changes. We leave them in the cache so they stay visible. Submitted changes cannot be reverted of course. Change-Id: Ibf400555effa1c3801d02f8713b4b69856ede23a Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* QSqlTableModel: do not store primaryValues in change cacheMark Brand2012-02-152-13/+7
| | | | | | | They can be generated on demand regardless of edit strategy. Change-Id: I1e1853e93cc453f1486b65ce577f00141b9c5c47 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* QSqlTableModel::primaryValues(): take care of row mappingMark Brand2012-02-151-18/+13
| | | | | | | | | There is no reason for the caller to be concerned with this. primaryValues() now takes advantage of the fact that QSqlQueryModel uses indexInQuery which was recently made virtual. Change-Id: I7d856ee05f55c3199fd17c618e559320d0582989 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* QSqlTableModel::commitAll(): replace row removal hackMark Brand2012-02-152-4/+20
| | | | | | | | | | | | | | | | | | | The purpose of the hack was to fool QSqlQueryModel into signaling the removal of extra rows via rowsRemoved(). The extra rows are the inserted rows generated by QSqlTableModel. While it is important to signal the removal of all the rows before requerying after committing changes, there is a cleaner way. The table model should remove its rows before the query model removes its rows. Iterating backwards avoids having to decrement row numbers above ones being removed. Expected test results have been adjusted for these changes. Change-Id: I0e8aa81f5e7b8fea5922f5ffd1cfb4a932313a10 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* QSqlTableModel: deduplicate and optimize counting of insertsMark Brand2012-02-152-14/+18
| | | | | | | | | Reading STL iteration code is painful enough if you only have to do it once. Thiago suggested remembering the end iterator for performance. Change-Id: Ic2cdc480f591932ea420e692a4d2796d49f05313 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* QSql*Model: make indexInQuery() virtualMark Brand2012-02-153-18/+16
| | | | | | | | | Qt 5 seems like an excellent opportunity to simplify logic and separate concerns by making indexInQuery() virtual. Note that this wasn't my idea, but was mentioned in a helpful comment. Change-Id: Ie29ead110def45297c32de3ce6d07a8eefb08d8c Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Allow the QLocalServer to listen to a native descriptorAndrew Stanley-Jones2012-02-157-4/+191
| | | | | | | | | | | | | QLocalServer could only listen to sockets it created. Thi is not always possible as sockets may be passed by socketpair() or have to be created locally by other means. This adds a similar feature to QLocalSocket where a native descriptor maybe used. Change-Id: I43b0af179b3b868dd164d4e1fd312ff4546cf9ff Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com> Reviewed-by: Tapani Mikola <tapani.mikola@nokia.com> Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* Remove fileLineEndingTest from networkselftest.Miikka Heikkinen2012-02-151-26/+0
| | | | | | | | | | | The fileLineEndingTest case doesn't test network in any way and it is conceptually wrong, too, as any tests where line endings are an issue should be handled with .gitattributes rather than forcing user to check out the repo with unix line endings. Task-number: QTBUG-24271 Change-Id: I73986993edc227cb68b8f61d51cc1cf458d20989 Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* Produce unimplemented warning for QOpenGLBuffer::map only onceAlex Wilson2012-02-151-2/+10
| | | | | Change-Id: Ia4f136e964e4e0ca326f462b0996ef3d1b843cf6 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Optimize memory consumption for simple GPOS tablesEskil Abrahamsen Blomfeldt2012-02-152-57/+170
| | | | | | | | | | | | | | | Sometimes GPOS tables are used for kerning and can grow quite large if the font is unoptimized. In that case, allocating the maximum size for each ValueRecord will have a great impact on memory consumption. For GPOS tables which do not contain device tables, we only allocate the memory actually need to store the data instead. While it would be possible to optimize memory for GPOS tables that contain device tables as well, this is not a part of this patch. Change-Id: Id665b2821675ef955c497c782f09f99af765b8a3 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Abort FTP download, not the whole applicationShane Kearns2012-02-152-5/+25
| | | | | | | | | | An old coding error meant that the C runtime abort() function was being called instead of QFtp::abort() when cancelling an FTP download using QNetworkReply::close() Task-number: QTBUG-22820 Change-Id: Ib97fda9769b2b55a08c042c66c4444cb6216d2b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixes QTemporaryDir compilation error under QNX.Rafael Roquetto2012-02-151-1/+1
| | | | | | | | Checking for Q_OS_QNX as well upon QFileSystemEngine inclusion. Change-Id: Ia0e0d7344abaae6dd6375528f0cc17dbefafe8d8 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove needless line "#define d d_ptr"Kent Hansen2012-02-151-2/+0
| | | | | | | | | | | | | | | | | | | There was a time when qsslsocket.h declared its private slots as Q_PRIVATE_SLOT(d, void _q_connectedSlot()) But now they are correctly declared as Q_PRIVATE_SLOT(d_func(), void _q_connectedSlot()) so the "#define d d_ptr" hack isn't needed. Specifically, the define would break moc-generated code that refers to the member d of a structure (which a future moc revision does, namely QByteArrayData::d). Change-Id: Ic94fa4d523fb17e8088973cfc0d090d5cce97267 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Store only unique strings in the QtDBus meta-object string tableKent Hansen2012-02-151-37/+51
| | | | | | | | | | | Do like moc: If the string has already been entered into the table, just return its position, don't make a new copy. This can save space, for example, if there are several properties of the same type; the typename only occurs once in the string table but will be referenced by several property descriptors. Change-Id: I63e5c73d28ba117fd00a5261d0e89f3a3d83df9a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move desktopSettingsAware to QGuiApplication.Friedemann Kleint2012-02-156-32/+31
| | | | | | | | | | | | For use by the QPA plugins. Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Morten Sørvig <morten.sorvig@nokia.com> Task-number: QTBUG-24204 Change-Id: I7f35274eedb55fcb60ad289768234bc302286d01 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows: Fixed helper process finding in network testsMiikka Heikkinen2012-02-154-11/+44
| | | | | | | | | | | | | | | | | | | | Helper processes were not found properly on all network tests when the test was run with "nmake check": - tst_qtcpsocket - tst_qtcpserver - tst_qnetworksession - tst_qnetworkreply Task-number: QTBUG-24199 Task-number: QTBUG-24203 Task-number: QTBUG-24226 Task-number: QTBUG-24231 Task-number: QTBUG-24232 Change-Id: Ia4451b5a5e3fe9f81aba3837baf8292411f995d8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* fix whitespace in qnamespace.qdocRick Stockton2012-02-151-24/+24
| | | | | | | | | | repair instances of (1) trailing ws; and (2) tabs+spaces. Task-number: QTBUG-22642 Change-Id: I775c6e1c65625340f6279bcff042dd8e74271021 Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix online status checking in generic bearer plugin.Xizhi Zhu2012-02-143-1/+98
| | | | | | | | | | QNetworkInterface::IsUp means the interface is up, but not necessarily connected. QNetworkInterface::IsRunning means the interface is up and connected. Task-number: QTBUG-22873 Change-Id: Ieb544058814520b4292b496de2e4672214f3d00a Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* Move QtConcurrent configuration to a single fileJoão Abecasis2012-02-1424-43/+111
| | | | | | | | | | | | | | This file lives in src/concurrent, alongside the rest of the library. Relevant configuration was moved out of qglobal.h, as it isn't relevant for other parties and thus isn't needed there. This introduces a global header that all QtConcurrent headers now include. This header includes qglobal.h and defines library-specific configuration for all to follow. Change-Id: If6f11e7bbc6139d29004eb1602bd579b75b637c8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* CompileBradley T. Hughes2012-02-142-2/+0
| | | | | | | mHackedPanel is not declared anywhere in the Cocoa dialog helpers. Change-Id: I3ba5dd429aa9fe5833b19c1e081425ec4020658d Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* update comment on testMark Brand2012-02-141-1/+1
| | | | | | | | Fix up for f5e1da12f0e7bdeee4db74acc52dfabeb12a4e31. Change-Id: I3a730ce7e47d71551a46cc105ba2d1fe4e33b65b Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>