summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Mac: remove some unused code in QFontDialogLiang Qi2012-11-062-33/+0
| | | | | | | | Those code was warpped by Q_WS_MAC and should be part of QPA already. Change-Id: I48b751aad0509b50ccf9e82778c962ed80a2a9f9 Reviewed-by: Jiang Jiang <gzjjgod@gmail.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Allow connect to functors with less parameters than the signalOlivier Goffart2012-11-061-1/+19
| | | | | | | | | | | | | | | | | | | | Before, the functor slot (or lambda expression) had to have the same amount of arguments as the signal. This shown to be a big problem to be able to connect to signals that had a QPrivateSlot. This implementation use the type of the operator() of the functor to know how many arguments we have. As a bonus, we also can check the arguments in a static assert. The test comes from https://codereview.qt-project.org/#change,38703 But this patch also works without variadic template If the compiler does not support decltype, we workaround the lack of it by using another level of indirection. Change-Id: I9850b43e8caf77356a2ec3f4c0b0ed532d96029e Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Don't include qaccessible.h on QT_NO_ACCESSIBILITYKevin Funk2012-11-061-1/+3
| | | | | Change-Id: I1da4036c211172a72b73440648f4ff9ede761a69 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Send QContexMenuEvent when Context Menu key is pressed.Friedemann Kleint2012-11-061-1/+8
| | | | | | | | Bring back code from keymapper_x11.cpp. Task-number: QTBUG-27648 Change-Id: I2a189a0537bcd2ae0eb093576c84814b2f09933b Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Improve Direct X SDK detection in configure.exeFriedemann Kleint2012-11-061-0/+1
| | | | | | | | | | | | | Check presence of Direct X SDK depending on compiler version. Check for presence of the headers d3dcompile.h and intrin.h (SSE2) as well as d3d9.lib and the shader compiler since the header d3dcompile.h is also present in MinGW. Change-Id: I7ee9701f4f9dc175ed2d733db79dda46de4d69f1 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Dynamically resolve functions of dwmapi.dll.Friedemann Kleint2012-11-063-12/+107
| | | | | | | | | | The library is not present on Windows XP, for which /DELAYLOAD is used in ANGLE. However, as this causes problems with MinGW, use dynamic resolution. Task-number: QTBUG-27741 Change-Id: Ie4a2706d57b751fbb6fc6f3e76ef2e8ddac3b892 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* QGtkStyle: GTK3 compatible combo boxesJ-P Nurmi2012-11-063-19/+24
| | | | | | | | | | | | Use gtk_combo_box_new_with_entry when gtk_combo_box_entry_new is not available. The latter was deprecated since 2.24 and is no longer available in GTK3. Notice that gtk_combo_box_new_with_entry returns a GtkComboBox, whereas the old gtk_combo_box_entry_new returned a GtkComboBoxEntry. Change-Id: I4aa3c528c6e04967ed783fce72036acb6063445b Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: GTK3 compatible type checkingJ-P Nurmi2012-11-062-5/+5
| | | | | | | | | | | - GtkType -> GType - GTK_CHECK_TYPE -> G_TYPE_CHECK_INSTANCE_TYPE Both are deprecated aliases in GTK2 and do not exist in GTK3. Change-Id: If2dc4ba09451cabb6730f8b23e15db7554a9f829 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: handle focus & default widgets in GTK3 compatible wayJ-P Nurmi2012-11-063-20/+70
| | | | | Change-Id: Ib4409c15599953a6626738543b27d14d711e7109 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* De-inline some destructors in QtWidgetsMarc Mutz2012-11-0630-1/+178
| | | | | | | | | | | | | | | | | | | | | | Destructors should be out-of-line so that the compiler doesn't generate one per translation unit. Apart from creating more work for the compiler, it can also lead to duplicated vtables if the dtor is the first virtual function (reimplementation), and all other virtuals are inline, too. Duplicate vtables then break RTTI. In addition, having virtual dtors de-inlined allows us to add code to them in a BC way. As a final argument, this change may lead to less code app-side, since a sequence of cross-DLL calls (to member variable dtors) is replaced by a single cross-DLL call to the new out-of-line dtor. Change-Id: Ifb8c4aa992c75d61ba9ac8de5ab41d1e96b0a0b1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fix native RGB text on OpenGL ES 2 without BGRA extensionEskil Abrahamsen Blomfeldt2012-11-062-3/+19
| | | | | | | | | | Angle, for instance, which is now the default on Windows, does not support the GL_BGRA_EXT format as input for glTexSubImage2D(). In the case where it's not detected, we therefore need to flip the bytes in the input. Change-Id: Ibe78d0223e3c2c39cb1943cdcf67103044d00aa7 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix connection to const slots (or from const signals)Olivier Goffart2012-11-061-0/+121
| | | | | | | | Pointer to const member function have a different signature, and hence need their own traits code. Change-Id: Ie4b2434a412f412444fb07ef1388a37cab105ecd Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix QAccessible to build when QT_NO_ACCESSIBILITY is definedJ-P Nurmi2012-11-051-0/+10
| | | | | Change-Id: I6104633cdc80425b8f4697acd28c9a156cd0d76f Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* QGtkPainter: use gtk_widget_get_style()J-P Nurmi2012-11-051-1/+1
| | | | | | | Do not access GtkWidget::style directly, it doesn't exist in GTK3. Change-Id: I1ee4ad5ca0894c9277219fc2a70f5f1c69ec632f Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix GDI leaks in fontengineMiikka Heikkinen2012-11-052-3/+6
| | | | | | | | | | GDI objects that are created need to be deleted once no longer needed, instead of just released. Task-number: QTBUG-27812 Task-number: QTBUG-27825 Change-Id: I53b04b54cea9e2aaa8fc72365c215f516c5682e6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QWindowsVistaStyle: Restore altered brush origin.Friedemann Kleint2012-11-051-0/+2
| | | | | | | | | | | The line to restore it was missing, and the leftover variable caused a warning, which was removed in abe5a0a432116963d22c4ef501a4dfd2393d66fb . Task-number: QTBUG-27828 Change-Id: I00b8b89b07bec38a1660c3a9c61220b6d0d7eb48 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* QtWidgets: add some explicitMarc Mutz2012-11-056-36/+39
| | | | | | | Change-Id: I0650db3d47b506c67074c526ab9857f8159fd599 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc fixes.Frederik Gladhorn2012-11-032-3/+1
| | | | | Change-Id: Id2042c33a9762261756d1065781005dfef341797 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Implement editable text interface for QLineEdit.Frederik Gladhorn2012-11-032-1/+22
| | | | | | | | This was uncovered by the linux accessibility test which tried to call non-existing functions. Change-Id: Iaa9640c23ee77d7c5b2321d7f8cfa6d12d61c0e9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* QTscii and QIscii are not big codecsPeter Kümmel2012-11-034-7/+7
| | | | | | | This fixes the build when QT_NO_BIG_CODECS is defined. Change-Id: I832fb8ba5df6c4a6c1db9bdaecc498690357a56a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix conditional jump based on an uninitialized variable.Jędrzej Nowacki2012-11-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | Valgrind warns about the jump in qfontconfigdatabase.cpp:522 based on uint QFondDef::hintingPreference:2 property. Surprising thing is that the property is initialized in the default constructor, so there should not be an issue. The warning disappear if the property is _not_ placed on a boundary of a two words, or if bit field is fully initialized. So I suspect that only one bit of the two was initialized properly. I decide to implement both solutions because of a potential minor performance improvement, during reading the property. I still fail to say why the value was uninitialized, I believe that this patch simply workarounds gcc bug or valgrind bug. Change-Id: I2e87738f66a435ef6e30b3d2db6baa73da025426 Reviewed-by: Jiang Jiang <gzjjgod@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Improve QByteDataBuffer::read() performance with partial readsAntti Harju2012-11-031-22/+48
| | | | | | | | | | | | | Add a read position variable to eliminate excessive memcpy'ing when reading a partial buffer. Specifically, fix performance issue of reading large files from QNetworkDiskCache in QtWebKit2. Task-number: QTBUG-27522 Change-Id: I21edc909bf9223971b2c3db5f1fa6b89c5b61c5f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Antti Harju <antti.harju@ixonos.com>
* Angle: Make it call the correct host toolsYuchen Deng2012-11-031-1/+5
| | | | | | Change-Id: Ib5a0da0ac50e0d2abebc825d6d6105ad5d84acd8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jason Barron <jason.barron@digia.com>
* Make QGLWidget::paintGL() call glClear().Morten Johan Sorvig2012-11-031-0/+1
| | | | | | | | | | | | Creating and displaying a plain QGLWidget on Mac would display "garbage" or previous frame buffer content on screen. This looks broken and raises interesting privacy concerns. Fix by adding a call to glClear(). Change-Id: I507c24275e41fac0be5f518c5a70d151099ae6b8 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Cocoa: make text subpixel rendering check to work for non-Apple displaysTeemu Katajisto2012-11-031-16/+38
| | | | | | | Task-number: QTBUG-27386 Change-Id: I4e12663f80060dfcea6970a705861af388d816ac Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QIdentityProxyModel: fix sibling() reimplementationMark Brand2012-11-021-1/+1
| | | | | | | | | | | The previously missing mapFromSource() sets the proxy model in the returned index. Otherwise, the returned index refers incorrectly to the source model. Follow-up to 9dfba89c28bbff3316cb7aed6c07f90c0f2d5a22. Change-Id: I78ab9183820909b646a7333f28aa5ec7266fa675 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Update mac-specific code in qtestlib for Qt5Liang Qi2012-11-022-16/+8
| | | | | | | | | | | | 1. Remove the code for activate application, due to Qt 5 already has this feature 2. Update the code for power setting Task-number: QTBUG-23267 Change-Id: Id257c2e10e8e750a4b68cd2995c2ac4b70f8910c Reviewed-by: Jiang Jiang <gzjjgod@gmail.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* Qt 5.0 QTreeView. Prevent manual moving of the first sectionThorbjørn Lund Martsum2012-11-025-1/+23
| | | | | | | | | | | | | | | | | | This prevents the user of moving the leftmost column. There will be no API to allow move of the tree-structure. It is very weird to do that, so it shouldn't be a problem. In case it is a big problem somewhere it can be hacked with: QTableView unused; unused.setVerticalHeader(tree->header()); tree->header()->setParent(tree); unused.setVerticalHeader(new QHeaderView(Qt::Horizontal)); Task-number: QTBUG-332 Change-Id: I3a251c8d0fd472ec0ad7edb20a7f3e00af7e0da8 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Mac: refactor scrollbar animationsJ-P Nurmi2012-11-0214-243/+274
| | | | | | | | | Get rid of QWidget-centric QMacStyle::eventFilter() and implement the fade out animations for scrollbars using QNumberStyleAnimation-based QFadeOutAnimation. Change-Id: I2000fa50d46b153e981ceafc12a53932a196382e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Make it possible to use mini and small size on mac without widgetJens Bache-Wiig2012-11-022-18/+20
| | | | | | | | We need to add the styleoption when evaluating the small and mini size hints. Change-Id: I00f8709912aa2202caef4dbdeaebb5d67cc9a9b4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Review of documentation.Michele Caini2012-11-021-6/+25
| | | | | | | Documentation has been updated, changes apply to Qt5 as well as Qt4. Change-Id: I13241a3b4c16d2cb1b24f80fe26832467621923a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make it obvious that adding a QLayout to QSplitter is not supported.Mitch Curtis2012-11-021-1/+8
| | | | | | | | | | | | | | | It does not make sense to add a QLayout to a QSplitter, since the splitter manages its child widgets in the same manner as a QLayout. The result of doing so is that the child widgets inside that layout will lead to the splitter and the layout fighting to position the child widgets. QSplitter::addWidget should be used to add widgets directly to the splitter instead. Change-Id: I640b463cae8673f87354d28636bff4dd3cfb9679 Reviewed-by: Samu Voutilainen <samu.voutilainen@gmail.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* xcb: Fix a trivial reply leakUli Schlachter2012-11-021-1/+1
| | | | | | Change-Id: Ib9a0f96007e6dc5e125bfcd39bd1ef09baebae3b Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* xcb: Fix a colormap leakUli Schlachter2012-11-021-0/+1
| | | | | | | | | The function createDummyWindow() allocated a colormap, but never freed it. Freeing it is safe after the window is created. Change-Id: I4c876568572c9e1e9dde7047850a51917ef3702f Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* XCB: Handle connection errorsUli Schlachter2012-11-021-0/+7
| | | | | | | | | | | | | | | | | | | | When the XCB connection breaks, all following XCB function calls will fail and function calls that are currently in progress will return. This means that xcb_wait_for_event() will return NULL and thus the QXcbEventReader thread will exit. This patch uses the above behavior to make sure that processXcbEvents() will be called. The error handling should always be done before normal event processing, because all XCB calls will fail once the connection is in an error state. This is especially unexpected for xcb_get_setup() which suddenly returns a NULL pointer. Task-number: QTBUG-27686 Change-Id: Ie3e4058f9d92bcbfc45934a8b36d9a7254e2b4bb Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QTranslator: Use resource memory instead of copying itThomas McGuire2012-11-021-35/+66
| | | | | | | | | Previously, translations in resource files were loaded through QFile and the data was copied. Now, simply use the resource memory in-place. Change-Id: I55a06c1e7bb15c169cc69b908b3021136beac9d2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix progressbar animation on macstyleJens Bache-Wiig2012-11-021-1/+2
| | | | | | | | The animation is not just supposed to run when indeterminate, but also while it is progressing. Change-Id: If176bd230c2f6f83781e01ea77526c24d54c8477 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* don't return false from removeTranslator() just because of shutting downOswald Buddenhagen2012-11-021-3/+5
| | | | | | | | the condition is supposed to suppress the event emission, not to trash the return value. Change-Id: I3e327ceedb909ac29ba975c49b0f039b50eb4ee1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix height of combobox in macstyle without a widgetJens Bache-Wiig2012-11-021-0/+1
| | | | | | | | When no widget is provided we hardcode the height and the value was off by 2. There is no change when a widget is provided. Change-Id: I555b5206b8750db06595a1e2572a3f8212635a9d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* fix cleanup of QWinIoCompletionPortJoerg Bornemann2012-11-022-3/+23
| | | | | | | | | The QWinIoCompletionPort thread was never properly cleaned up. Maintain a reference count for QWinIoCompletionPort and create/destroy it on demand. Change-Id: I607b574484554dd3ad107dfb43b0a248bcf8b7a4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* move QT_NAMESPACE define to qtcore's module pri fileOswald Buddenhagen2012-11-021-0/+2
| | | | | | | it's basically an attribute of qtcore (and everything that depends on it). Change-Id: I6eeefeb5df70764399d9f22dca9dbec1843b8d68 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>
* QNX: Fix build with QNX SDP 6.5.Sergio Martins2012-11-021-1/+1
| | | | | | | | | | | | __EXT_LF64SRC isn't defined in this case. This also makes it consistent with mkspecs/common/posix/qplatformdefs.h which uses QT_USE_XOPEN_LFS_EXTENSIONS and QT_LARGEFILE_SUPPORT to decide which type of stat struct to declare. Change-Id: Iaa155acc270783901376b543fdeffb5263294754 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Blackberry: Fix QCoreApplication::applicationFilePath() performance.Sergio Martins2012-11-021-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | Listing all files with QDir is slow. Instead, use argv[0] for zygotized apps and _cmdname() for non-zygotized. Apps run through the terminal will fall in the zygotized case, which is ok. Note about zygotized apps: Zygotized apps don't have an executable, they live in a shared object file. These apps are run through a deamon that forks and dlopens() the shared object ( for performance reasons ). For this reason we can't use _cmdname(), since it just contains the the file path of the daemon. On the other hand, non-zygotized apps have a bogus argv[0] when run through the navigator ( command line is fine ). Change-Id: I9953e8fa05c9fb11c33b3a38ebab00fe33ba4c44 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* QHeaderView 5.0 - correct drop on manual QHeaderView sectionmoveThorbjørn Lund Martsum2012-11-021-1/+1
| | | | | | | | | | | | | | | | | This fixes an error in the calculation of the exact drop position when an user is moving a section in QHeaderView. Before we compared a mouse-position local to the widget (pos) with a summed length of sections (posThreshold). However we need to consider/substract the headers offset to make the posThreshold comparable to the local mouse position. This solves e.g. Task-number: QTBUG-14814 Change-Id: If0281cf0c7b98316474f18e8eaa32c6d062dda56 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QHeaderView - call invalidateCachedSizeHint() on clearThorbjørn Lund Martsum2012-11-021-0/+1
| | | | | | | | | This calls invalidateCachedSizeHint on clear, which is a logical thing to do. Task-number: QTBUG-22528 Change-Id: I0befb2d492599fa8a05b1c2162bbca586e1b019d Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add implementations of QAIM::sibling in public APIs.Stephen Kelly2012-11-0211-0/+60
| | | | | | Change-Id: I2248641f2ed8735c28bd9572470520995a4a5b62 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Cocoa: Fix fonts on retina displays.Morten Johan Sørvig2012-11-021-4/+3
| | | | | | | | | | | | | | | | | | | Hardcode logical dpi to 72 again. NSDeviceResolution gives us the physical dpi (144) and results in double- sized fonts in Qt. QPlatformScreen does not currently have a physicalDpi virtual, perhaps this can be added later on. Unfortunately the usefulness of a per-screen correct DPI metric seems questionable to me: 1) The value returned by the system is not correct, pixels per inch on the rMBP is around 220. 2) Qt always uses the dpi for the main screen, via qt_defaltDpiX/Y. Change-Id: Ia35804be62ee7f1c623bad854f65d744dc9075d4 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* QWindowsVistaAnimation: inherit QBlendStyleAnimationJ-P Nurmi2012-11-022-131/+10
| | | | | Change-Id: I15b348eb842730513480ecbb90bca87174d7c771 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>