summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Port QMacPrintEngine and QCoreGraphicsPaintEngine from Qt 4 to Qt 5Bradley T. Hughes2012-03-159-2/+3079
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copy qprintengine_mac_p.h, qprintengine_mac.mm, qpaintengine_mac_p.h, and qpaintengine_mac.cpp (as qpaintengine_mac.mm) from src/gui/painting/ in the 4.8 branch of http://git.gitorious.org/qt/qt.git at commit e6bd33d4aef0e4538d7918e7ab130624c911b553. The following changes are necessary to port these files to the Qt 5 API: - The copyright notice on these files has been updated to match the header.LGPL template. - Fix #includes for qprintengine_mac* and qpaintengine_mac*, as some headers have moved in Qt 5. - Remove extern forward declarations for functions that no longer exist. - Remove friend declarations for classes/functions that are not part of the Cocoa platform plugin. - Remove QT_MAC_USE_COCOA blocks. Qt is always using Cocoa now, there is no need to keep the non-Cocoa code paths anymore. The QMacPrintEngine::shouldSuppressStatus() method was also removed, since it is no longer used. - Do not use Qt::UniteClip, it was removed in commit 01b72952c38b9193138eabdab6bdab632cd75ebd - Use QCocoaAutoReleasePool in qprintengine_mac.mm - Use QPlatformPrintSupport::convert*() functions in QMacPrintEngine, since we cannot use non-exported functions from QtPrintSupport in the Cocoa plugin. - Use qt_mac_image_to_cg_image() to convert QPixmap to CGImageRef. First convert QPixmap to QImage (cheap, since the Cocoa platform plugin uses QRasterPlatformPixmap), and then convert the QImage to CFImageRef using the existing helper function. - Copy qt_mac_cg_context() to the Cocoa platform plugin from qmacstyle_mac.mm, adding a note at each location about the duplication. - Add qt_mac_QRegionToHIMutableShape() helper. Adapt the Qt 4.x code for QRegion::toHIMutableShape(), and use this in QCoreGraphicsPaintEngine. - Add qt_mac_drawCGImage() and qt_mac_get_scalefactor() helper. These functions are copied directly from the 4.8 branch of http://git.gitorious.org/qt/qt.git at the same revision shown above. - Add qt_mac_create_imagemask() helper in qpaintengine_mac.cpp. This helper is based on the function with the same name from the 4.8 branch of http://git.gitorious.org/qt/qt.git at the same revision shown above. The correctness of the implementation has not yet been verified. Since these files use the QPrinter API from QtPrintSupport, the Cocoa plugin now needs to link to that library as well. Change-Id: I90b9bbe201327489ef9e1b3294e68e91ddda27bd Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Remove QtWidgets dependenciesHarald Fernengel2012-03-153-6/+6
| | | | | | | | Remove references to libQtOpenGL, and use QGuiApplication instead of QApplication Change-Id: If8f652223492cf758175a260c27b687f3af1c4ad Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* improve processing stylesheet propertiesMark Brand2012-03-151-25/+24
| | | | | | | | | | | | | | By scanning the properties in reverse order we don't have to save properties in the list only to remove them later when the occur again. It's also unnecessary to cache the values since they can be easily plucked out of decls. Various other tests can be done once per property instead of once per property occurence in decls. Change-Id: I81cf60c59efaeed57fc9c12df98279d6cae116cd Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: John Brooks <john.brooks@dereferenced.net>
* implement virtual destructor in QPlatformSurfaceGunnar Sletta2012-03-152-0/+6
| | | | | Change-Id: Iaadd9c3cd7c2e2022066ca859cbe1e912050c561 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add new plugin metadata description and eglfs.json fileJohannes Zellner2012-03-153-4/+11
| | | | | | Change-Id: Ia594c18ba24e5fccf9fa59b9be6efcbeae00fad6 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove unmaintained and broken VNC platform pluginJohannes Zellner2012-03-158-3161/+0
| | | | | | | Change-Id: Ie0a07c3a6822870b095a20d997b63fb1635f20be Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Robert Griebl <robert.griebl@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Use strlen to determine length of returned pathJoão Abecasis2012-03-151-1/+1
| | | | | | Change-Id: I8603f032bacdbb060be043f8720bd2b8c34d7ec6 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* LSB requires an explicit header includeHarald Fernengel2012-03-151-0/+4
| | | | | | | Makes the plugin build in the LSB environment Change-Id: Ic9a54b984f7fc1f393853ec01e32886f49a041c6 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Compile in the LSB envHarald Fernengel2012-03-151-1/+1
| | | | | | | | madvise is not part of the LSB, use posix_madvise instead Change-Id: I661e8c5aece5a764a2a9032fcfab49241ab96dd8 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename qdoc index file to qdoc-index.htmlCasper van Donderen2012-03-151-1/+1
| | | | | Change-Id: I74fcbce7d2929c31031db379d5e0b4b0d2f48800 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Rename all occurences of qdoc3 to qdoc in the qdoc manual.Casper van Donderen2012-03-153-9/+9
| | | | | Change-Id: I84cfab5a7130aff9ed8a6eb568d78f29167e1ac8 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* qdoc3: Change suffix of DITA files to .ditaMartin Smith2012-03-154-11/+13
| | | | | | | | | | The files output by the DITA XML generator now have .dita on the end instead of .xml, but the ditamap files still use .ditamap . Task-number: Mzilla bug - 7291 Change-Id: Idb8b70c5d3f2ac2c4fdf195e385393f7ac68b7ba Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Build with the LSB build envHarald Fernengel2012-03-151-1/+5
| | | | | | | | LSB doesn't define some functionality that we expect on Linux, so fall back to the generic code. Change-Id: I19e09908b9e9002140535f159ae0745d7ca80b70 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add a way to query for global handles in QPlatformNativeInterfaceJørgen Lind2012-03-152-0/+6
| | | | | Change-Id: I4f29f40a3d6d4237f7da092bb34b8e596321b47d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QHttpNetworkConnectionChannel: Warn if bytesAvailable and no replyMartin Petersson2012-03-151-3/+3
| | | | | | | | | | If there are no bytesAvailable and no reply then the channel can be closed without any need for this warning. Task-number: QTBUG-9315 Change-Id: Ifbb1f4732d3173a7807ac5bd0dc78fb5144faaf3 Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QTableView: call model->submit() on row changeMark Brand2012-03-151-0/+16
| | | | | | | | | QTreeView already does this in the exact same way. It's necessary to call submit() so edit strategy OnRowChange in QSqlTableModel will work as expected. Change-Id: Ib430143e8a71f3b0bcd842fcc772cc7ee4525f0a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QSqlTableModel bugfix: consider uncached rows submittedMark Brand2012-03-151-0/+2
| | | | | Change-Id: I7ec0529b88fd8e3ae0cf8dadfcb5899579e52745 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* Refactor theme plugin loading.Friedemann Kleint2012-03-1516-37/+111
| | | | | | | | | | | | | | | | | | | | In the old implementation, the QPlatformIntegration was asked for the theme first, so there was no way of overriding that by a custom plugin. Also, there was a memory leak in case the platform theme was actually created by a plugin. QGuiApplication now asks the QPlatformIntegration for a list of potential theme names first, tries to load them using the plugin loader and finally invokes a factory method of QPlatformIntegration in case that fails. The theme is now owned by QGuiApplication. In the XCB plugin, the environment variable DESKTOP_SESSION is queried and appended to the list of themes, making it possible to load plugins for other session types. Change-Id: I1a4b4e061815bca16c65b23e591bb7563a3e44e2 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Simplify QMetaObject::newInstanceJędrzej Nowacki2012-03-141-3/+3
| | | | | | | | | To create space on stack for a QObject pointer QVariant is not really essential. Change-Id: Iaf04a4f77005e33823f0e14bfdc6fe927cb59867 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Reimplement QMetaType::create method.Jędrzej Nowacki2012-03-141-228/+55
| | | | | | | | | The method was reimplemented using QMetaTypeSwitcher. That should reduce maintenance costs, because types list is populated automatically now. Change-Id: I6637f7b928218ce60b2ec7436079a44089f0e00f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Cocoa: Improve basic window handling.Morten Johan Sorvig2012-03-146-190/+196
| | | | | | | | | | | | | | | | | | | | Refactor NSWindow creation into createNSWindow and setNSWindow. This is necessary to support QMacNativeWidget where we re-use an already created window. Implement popup window handling. Make sure the window is displayed correctly and closes when it should. Take control over window activation in order to prevent infinite loops involving the QtCreator "cmd-k" window. Activation events are for now not sent to popup-type windows. There is now a different set of test failures: add and remove some QEXPECT_FAILs. Change-Id: I229761b59f90c9815b968eacc2cbc9c20cc5047e Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix a memory leak in QMetaObject::connectSlotsByName function.Jędrzej Nowacki2012-03-141-1/+1
| | | | | | | | QObjectPrivate::Connection time life should be controlled by QMetaObject::Connection handle. Change-Id: Ie7fcd950082a3e6cebc29ecc0622007470914edb Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix compilation of the Windows accessibility code for MinGW.Friedemann Kleint2012-03-147-34/+57
| | | | | | | Temporarily disable the code for MinGW. Change-Id: I435305167e06af05b9a78901e6e3a35347c5c3f5 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Add QGuiApplication::platformName.Friedemann Kleint2012-03-143-2/+22
| | | | | | | Store the name of the QPA plugin as platformName. Change-Id: Id87cab2a189743c0dd727c86080f7d4595a852bb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Explicit use of null namespace breaks namespaced buildDonald Carr2012-03-141-3/+3
| | | | | | | | These changes are currently required to successfully build Qt when it is configured with a namespace via the configure -qtnamespace argument Change-Id: I9f3ab30579c16085c4d3d05705336b810466c331 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove unused forward declaration.Sergio Martins2012-03-141-1/+0
| | | | | | | Change-Id: Ib207e0036226dd7131195244bf49bbfae142cd22 Reviewed-by: Sean Harmer <sh@theharmers.co.uk> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* bootstrap: remove QtXml dependencyGiuseppe D'Angelo2012-03-143-19/+15
| | | | | | | | | | Only qdoc is now using QtXml classes, so just add them to qdoc.pro and drop them from the bootstrap library. Change-Id: I821839396141d1d7a2ada565a513aa46c54c9620 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStyleSheetStyle: Fix icon properties.Friedemann Kleint2012-03-141-2/+1
| | | | | | | | Convert icon structure returned by the CSS parser. Change-Id: I19b846c6cb0ec19045b6d07b3caa5ecfac75ca86 Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QHeaderView - documentation update. Prefer hideSection over 0-resize.Thorbjørn Lund Martsum2012-03-141-2/+4
| | | | | | | | There is a different behavior on 0 sections and hidden sections e.g with scrollbars. Normally people want to use hideSection. Change-Id: Id99de30ea46906bb4ef7720ed12d4ac9615c9743 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Disconnect slots from the old sourcemodel in QIdentityProxyModelkb2012-03-141-40/+40
| | | | | | | | | | | | | When setting a new sourcemodel QIdentityProxyModel::setSourceModel tries to disconnect from signals belonging to the NEW model instead of from the existing sourceModel(). QIdentityProxyModel thus receives signals from both the old model(s) and the new model. This results in ASSERTS triggering in various slots, for example: "Q_ASSERT(topLeft.isValid() ? topLeft.model() == model : true);" in QIdentityProxyModelPrivate::_q_sourceDataChanged. Change-Id: Ic6f65a9ee10981d00206335f2edef78272fadc1a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QHeaderView - renaming functions in Qt5Thorbjørn Lund Martsum2012-03-146-48/+117
| | | | | | | | | | | | | | This patch renames the functions in Qt5 according to the notes. It also renames resizeMode to be consistent. The old functions are both marked with both QT_DEPRECATED and '### Qt 6 - remove' All usage of the function within the qtbase are also changed to use the new functions. Change-Id: I9e05fa41d232e9ca43b945fcc949987017f3aedd Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix LSB buildHarald Fernengel2012-03-141-2/+3
| | | | | | | | Fix compliation in LSB by removing legacy calls and adding an explicit header. Change-Id: I13a73211c07457195b5d5aad0854643da1e25f9b Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Add two (forgotten) since 5.0Thorbjørn Lund Martsum2012-03-142-0/+4
| | | | | | | | | | | | SHA for QWidget::hasHeightForWidth change: 466107107a85e7211c4b7f77b36ec50625657061 SHA for QAbstractItemDelegate::destoryeditor change 15f253a46aa45e2a9fa1055799fa2768ba49b9a3 Change-Id: Ic7e38c15f62eef22ab95414fad6e7b6c9c7d4f59 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Use the lazily-queried families for all QPA multi font engines.Pierre Rossi2012-03-1411-40/+53
| | | | | | | | | This is the approach introduced together with the WebKit "backdoor" that lets us use QRawFont with QTextLayout. We could use it all over the place and share more code. Change-Id: Ie1963679755f37ba9204d67554a163f1d1115604 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* QRegExp: remove docs about RegExp2 being default in Qt5Giuseppe D'Angelo2012-03-141-2/+2
| | | | | | | Change-Id: I37f4086d53ce6f2d6774ab204808d0d678a68349 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix build error when QT_NO_FILESYSTEMWATCHER is setsh kim2012-03-142-1/+5
| | | | | | | | QPollingFileSystemWatcherEngine inherits from QFileSystemWatcherEngine. This class should be covered by !QT_NO_FILESYSTEMWATCHER. Change-Id: I053a873018cf3c9c443435c9b3f44240b0965c24 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* build fix for -no-freetype in Windowsjian liang2012-03-145-22/+23
| | | | | | | | | | Don't use QWindowsFontDatabaseFT::systemDefaultFont() and QWindowsFontDatabaseFT::LOGFONT_to_QFont() in qwindowsfontdatabase.cpp and qwindowstheme.cpp because it is not available when building with -no-freetype. Change-Id: I11075475ff435c55b0c641540f95a4d3861b79da Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Made sure first created xcb window still receives focus.Samuel Rødal2012-03-141-1/+2
| | | | | | | | | | | | Change 50ca45f059524293790 caused mapped windows to not receive focus by default. The _NET_WM_USER_TIME spec says that if the user time is set to 0 (or CurrentTime), the window will not be initially focused. Thus, if the connection time has not yet been set, we skip this part to restore the old behavior. Change-Id: I19de3602c78629ad2bc65f5e1976313949c82c4c Reviewed-by: Jan Arne Petersen <jpetersen@openismus.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Unify QMetaType::TypeFlags detection.Jędrzej Nowacki2012-03-143-21/+15
| | | | | | | | | Duplicated code was removed. As an side effect: - one runtime flag check was replaced by a compile time check. - is enum flag can be used together with built-in types. Change-Id: I54173e7b07ce7e487d3cc21ba24dcccd28b5d049 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* remove obsolete qudevhelper and adopt mouse and touch pluginsJohannes Zellner2012-03-1411-135/+251
| | | | | | | | | | | | The QUDevHelper class is now replaced by QUDeviceHelper class. All evdev input plugins are using the new udev helper now to enable hotplugin for keyboard and mouse input. EvdevTouch plugin still only uses the first detected device by udev, this cannot be tested on my side, due to the lack of multiple touch input devices. Change-Id: I01a4cfe1a80000bfb27c67a2f53faf560906b73c Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Removed invalid assert in BMP loader code.Kim Motoyoshi Kalland2012-03-141-2/+0
| | | | | | | Task-number: QTBUG-24505 Change-Id: I2e369b6d92f072caadeda41125303856ddfabd48 Reviewed-by: aavit <qt_aavit@ovi.com>
* Windows: Fix QSpinBox background setting via stylesheetMiikka Heikkinen2012-03-132-4/+8
| | | | | | | | | | | | | | | | When using stylesheets, palette mask for drawing the background of line edit child of spinbox is already correctly resolved to style options in QStyleSheetStyle::drawPrimitive(), so we cannot simply ignore that mask and check the palette mask of the parent spinbox. Fixed by using a union mask of the parent spinbox palette and the palette supplied by style option instead of simply using the mask from parent spinbox. If either specifies custom base color, use that to paint the background of the spinbox's line edit. Task-number: QTBUG-24323 Change-Id: I1e738192db83b16d9bd48da54d29779e18788ef7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* improve declaration scopeMark Brand2012-03-131-1/+1
| | | | | Change-Id: Id8d8f4e59793ba5fc2d3afa31674009af73a59c9 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* use QStringLiteralMark Brand2012-03-131-1/+1
| | | | | Change-Id: I0f2b6ff758524e872d38dcbdc9335264431e3dc6 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix memory leak when sqlite3_open_v2 failsHonglei Zhang2012-03-131-0/+5
| | | | | | | | | | | | | | According to SQLite documentation, a database connection handle is usually returned, even if an error occurs. This behavior has caused Qt to leak memory when opening a database is failed. Now, even if sqlite3_open_v2() does not return SQLITE_OK, Qt tries to release SQLite database handle by calling sqlite3_close(). Task-number: QTBUG-15773 Change-Id: I6538e2897216828a9cfb95b7d4a5cec437aa6c28 Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Deliver events in qtestmouseLaszlo Agocs2012-03-131-6/+11
| | | | | | | | | | | | | Not waiting until the QPA event queue is processed after handleMouseEvent() is wrong. Unlike the synchronous sendEvent() calls these tests most likely utilized earlier, many of the QWindowSystemInterace functions are asynchronous in the sense that they just queue the event, delivery will happen when the event dispatcher on the main thread gets there. Change-Id: I8197d2dc4805cda684a8279ceb8d4b317f19aba7 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Add support for IAccessible2 on WindowsJan-Arve Saether2012-03-13135-409/+42522
| | | | | Change-Id: Ia955ab46dc5037ed1c74e0acc525e98b02552c97 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* uic: Avoid creating multiline QStringLiterals for MSVC.Friedemann Kleint2012-03-131-10/+25
| | | | | | | The compiler complains about L"foo" "bar". Change-Id: I94be0528b26fe65413db56d210a5c02fcdba13a3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Optimize HB memory consumption of PairPos1 in GPOS tablesEskil Abrahamsen Blomfeldt2012-03-132-28/+101
| | | | | | | | | | | | | This is pretty much the same fix as in be0dfa34737a014e7ad060a90c4c24be9998fe13 but for PairPos format 1 instead of 2. With very simple GPOS tables we would waste a lot of memory on caching an uncompressed table, so we now compress it in memory as well. Change-Id: I601331b4b83f636dab9e1ac403b343558c15b0de Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* qdoc3: qdoc now handles overloaded methods for QMLMartin Smith2012-03-138-15/+81
| | | | | | | | | | | | When a C++ class is documented as a QML type, it can have overloaded QML methods. These are now handled correctly by qdoc. The method list for QML types is now output with the full method signature. For signals and handlers too. Task-number: QTBUG-24670 Change-Id: If529d4136f5b480373b6ac25d2dceef15e6ea3db Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>