Commit Graph

10525 Commits

Author SHA1 Message Date
Frederik Gladhorn
bc88080a42 Doc fixes.
Change-Id: Id2042c33a9762261756d1065781005dfef341797
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-03 21:10:20 +01:00
Frederik Gladhorn
5bd55890fa Implement editable text interface for QLineEdit.
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>
2012-11-03 19:24:00 +01:00
Peter Kümmel
9764907240 QTscii and QIscii are not big codecs
This fixes the build when QT_NO_BIG_CODECS is defined.

Change-Id: I832fb8ba5df6c4a6c1db9bdaecc498690357a56a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-03 16:16:35 +01:00
Sergio Ahumada
ccc4fbdf3f test: Remove some QSKIP's from tst_QStyle
Change-Id: Ic277889a75871a8bf72ab2eb2b97e6deeed498e9
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-11-03 11:21:47 +01:00
Jędrzej Nowacki
fb0f58f50f Fix conditional jump based on an uninitialized variable.
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>
2012-11-03 11:20:26 +01:00
Antti Harju
8fb379dc8a Improve QByteDataBuffer::read() performance with partial reads
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>
2012-11-03 00:24:37 +01:00
Yuchen Deng
0d9eba94dc Angle: Make it call the correct host tools
Change-Id: Ib5a0da0ac50e0d2abebc825d6d6105ad5d84acd8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jason Barron <jason.barron@digia.com>
2012-11-03 00:24:37 +01:00
Morten Johan Sorvig
9830ba007a Make QGLWidget::paintGL() call glClear().
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>
2012-11-03 00:24:37 +01:00
Teemu Katajisto
efc9b77a6e Cocoa: make text subpixel rendering check to work for non-Apple displays
Task-number: QTBUG-27386

Change-Id: I4e12663f80060dfcea6970a705861af388d816ac
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-11-03 00:24:37 +01:00
Mark Brand
e5ac4fb9b2 QIdentityProxyModel: fix sibling() reimplementation
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 9dfba89c28.

Change-Id: I78ab9183820909b646a7333f28aa5ec7266fa675
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-02 22:42:36 +01:00
Liang Qi
698ae963e4 Update mac-specific code in qtestlib for Qt5
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>
2012-11-02 19:49:22 +01:00
Thorbjørn Lund Martsum
e0fc088c0c Qt 5.0 QTreeView. Prevent manual moving of the first section
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>
2012-11-02 19:49:22 +01:00
J-P Nurmi
3c2bfbff5f Mac: refactor scrollbar animations
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>
2012-11-02 19:49:22 +01:00
Jens Bache-Wiig
020196d16b Make it possible to use mini and small size on mac without widget
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>
2012-11-02 19:49:22 +01:00
Michele Caini
b0bc4f3279 Review of documentation.
Documentation has been updated, changes apply to Qt5 as well as Qt4.

Change-Id: I13241a3b4c16d2cb1b24f80fe26832467621923a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-11-02 19:49:22 +01:00
Mitch Curtis
61e0fa5d68 Make it obvious that adding a QLayout to QSplitter is not supported.
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>
2012-11-02 18:07:54 +01:00
Uli Schlachter
b4dd6faac3 xcb: Fix a trivial reply leak
Change-Id: Ib9a0f96007e6dc5e125bfcd39bd1ef09baebae3b
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-02 18:07:35 +01:00
Uli Schlachter
546abecd8a xcb: Fix a colormap leak
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>
2012-11-02 18:07:35 +01:00
Uli Schlachter
0b1ce5db9e XCB: Handle connection errors
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>
2012-11-02 18:07:35 +01:00
Thomas McGuire
92d75077d6 QTranslator: Use resource memory instead of copying it
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>
2012-11-02 18:07:35 +01:00
Jens Bache-Wiig
28f36ebcc2 Fix progressbar animation on macstyle
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>
2012-11-02 18:07:35 +01:00
Oswald Buddenhagen
faa3759120 don't return false from removeTranslator() just because of shutting down
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>
2012-11-02 18:07:35 +01:00
Oswald Buddenhagen
90387bb446 do not add DEPENDPATH to VPATH
DEPENDPATH merely says where to look for impliciit dependencies, not
where to find explicit ones.

fwiw, the other way round may be considered correct, but DEPENDPATH
exists for the sole purpose of limiting which paths should cause
recompilations, so it would be counterproductive to extend with with
VPATH.

Task-number: QTBUG-11912
Change-Id: I86450b5fd5aeb1f1b015b53f0adcd167ff4ce04d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-02 18:07:35 +01:00
Oswald Buddenhagen
754cf42bb5 don't unset TARGET_VERSION_EXT
otherwise we may remove a user-provided setting.

Change-Id: If3217a3d92938fe2f3ac3740a645d3ace0ce9ab0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-02 18:07:35 +01:00
Jens Bache-Wiig
0506c2fbb9 Fix height of combobox in macstyle without a widget
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>
2012-11-02 18:07:35 +01:00
Joerg Bornemann
40c9a3ef11 fix cleanup of QWinIoCompletionPort
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>
2012-11-02 18:07:35 +01:00
Oswald Buddenhagen
76dfe82add move QT_NAMESPACE define to qtcore's module pri file
it's basically an attribute of qtcore (and everything that depends on it).

Change-Id: I6eeefeb5df70764399d9f22dca9dbec1843b8d68
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-02 18:07:35 +01:00
Oswald Buddenhagen
32437370d6 let winmain just use qtcore
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>
2012-11-02 18:07:35 +01:00
Oswald Buddenhagen
80439fbd82 move invariant CONFIG flags out of the configures
we now have qt_build_config.prf which can contain static code.

Change-Id: I3f0ae142fdc5ffb4e1d25e628e809ba15b5f0ac4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-02 18:07:35 +01:00
Oswald Buddenhagen
bc64a7a6f7 remove pointless messing with CONFIG+=fix_output_dirs
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>
2012-11-02 18:07:35 +01:00
Sergio Martins
b8e7265a50 QNX: Fix build with QNX SDP 6.5.
__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>
2012-11-02 18:07:35 +01:00
Sergio Martins
527e67f232 Blackberry: Fix QCoreApplication::applicationFilePath() performance.
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>
2012-11-02 18:07:35 +01:00
Thorbjørn Lund Martsum
d625535728 QHeaderView 5.0 - correct drop on manual QHeaderView sectionmove
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>
2012-11-02 16:25:22 +01:00
Thorbjørn Lund Martsum
aa2578a100 QHeaderView - call invalidateCachedSizeHint() on clear
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>
2012-11-02 16:25:12 +01:00
Stephen Kelly
9dfba89c28 Add implementations of QAIM::sibling in public APIs.
Change-Id: I2248641f2ed8735c28bd9572470520995a4a5b62
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-02 16:25:02 +01:00
Joerg Bornemann
000025ca1e speed up tst_QLocalSocket::readBufferOverflow
Ifdef out waitForBytesWritten on Windows.
See comment in source.

Change-Id: I7a2268d2634c2524cd8291c72dd9708e430e314e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-02 15:59:57 +01:00
Morten Johan Sørvig
b2189acfc1 Cocoa: Fix fonts on retina displays.
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>
2012-11-02 15:58:25 +01:00
J-P Nurmi
324a41db45 QWindowsVistaAnimation: inherit QBlendStyleAnimation
Change-Id: I15b348eb842730513480ecbb90bca87174d7c771
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-02 15:58:14 +01:00
J-P Nurmi
d53ac9d8ca Introduce QBlendStyleAnimation (based on QWindowsVistaAnimation)
Change-Id: Ie289debe69ea7f6bb7833f979e39bb91290cc49c
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-02 15:57:11 +01:00
Morten Johan Sørvig
3cf5ef7fe5 Cocoa: Disable malfunctioning updateScreens().
The current updateScreens() implementations deletes
QScreens and creates new ones. Deleting a QScreen hides
all its windows. The result is that Qt windows disappears
when applicationDidChangeScreenParameters is called.

Change-Id: I5870d025d2bbf36621817cb220a835d1a6b367dc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2012-11-02 15:48:53 +01:00
Mark Brand
36514a9220 specify MODULE to avoid module .pri filename clash
Since 733ac1f6e6 the default MODULE
is the base of the .pro file for the plugin (i.e., "windows"). Since
MODULE becomes the base of the module .pri, the names of the module
.pri files can clash. Now we explicitly specify MODULE for
printersupport plugins to avoid overwriting the module .pri files of
the platform plugins whose .pro files have the same names.

Follow-up to 81f8f0db5c which renamed the
TARGET.

Change-Id: Ie83892dc419257e1df3b81bcf6ecec751ae345b0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-02 15:25:14 +01:00
Jens Bache-Wiig
7d497846f0 Fix font and positioning of headerview labels on mac
The old code rendered text too large. On desktop components,
the widget workaround ensured that text was clipped.

This should address both problems. Since we anyway do not
adapt the height to font size, I dont se a point in
supporting custom fonts here.

Change-Id: If3c0509cdff4dbadfd98bd4b1934eaa665148cbf
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2012-11-02 15:24:20 +01:00
Friedemann Kleint
0a91c9df01 Fix submenu navigation.
Bring back code that was removed
in Qt 4: 60324267fbb8a8554e62aaf9ef01360709292320 for QTBUG-7411 .

This code reselects the submenu action of a currently opened
popup when the mouse is moved to the submenu crossing other
actions. In addition, make sure it only triggers when
the reason is not keyboard selection.

Task-number: QTBUG-20094
Change-Id: Ibb73f83e86635083aad8b1e79fc0fdd512c65754
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-02 15:18:57 +01:00
Thiago Macieira
a025a2fcfa Allow QStandardPaths (Mac, Windows, Unix) to be bootstrapped
This allows using QStandardPaths in one of the bootstrapped tools, if
required for a future need.

The Blackberry version appears to be usable in bootstrapped mode
already.

Change-Id: Ia4e9b9564395d2e151f8ac229ac2a2aa2982e92f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-02 15:18:44 +01:00
Samuel Rødal
300534fc21 Added MultipleWindows platform capability.
Several platform plugins, like eglfs, kms, etc don't support multiple
windows as there's no system compositor, they're rendering directly to
a single back buffer. By adding a platform capability we'll be able to
provide better error reporting when an application tries to create
multiple QWindows on a single-window platform. Also, QML apps can use
this capability to figure out whether they should create a QWindow for
dialogs / popups / menus, or whether to just create items in the same
scene, that are shown on top of the rest of the content.

Change-Id: I15b8d21ee2bc4568e9d705dbf32f872c2c25742b
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2012-11-02 12:17:27 +01:00
Friedemann Kleint
6be78c0712 Exclude ANGLE headers from syncqt-checks.
Change-Id: I08797e1cdfc2d79b0292f4d8077847496c4bac62
Reviewed-by: Jason Barron <jason.barron@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-02 12:16:49 +01:00
Friedemann Kleint
8727826871 QFileDialog: Do not pass on file model root to QFileDialogOptions.
QFileDialog::selectedFiles() defaults to file model root
for 'AnyFile', which confuses native dialogs since
selectedFiles == directory in that case. Split up
QFileDialog::selectedFiles() and skip the default when
initializing QFileDialogOptions for native dialogs.

Change-Id: I65cda182df8b1748159058fc361c10d97f5650ce
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-02 12:16:49 +01:00
Joerg Bornemann
c6f3d919dd fix error handling bug in QWindowsPipeReader
If ReadFile returns with an error then we must set our internal state
accordingly. QWindowsPipeReader::readSequenceStarted must be set to
false. If ReadFile fails, we're not within a read sequence.
Also, we must handle the ERROR_BROKEN_PIPE error.

Task-number: QTBUG-25342

Change-Id: Ic9247f170fa9cc47fa7e45d0f47ccfedac06a593
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-02 12:16:49 +01:00
Joerg Bornemann
44e0d2b328 fix tst_QProcess::batFiles for shadow builds
Change-Id: If7a9c9aa6ba16b7744d8ef8a66b43e40f375b5e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-02 12:16:49 +01:00
Frederik Gladhorn
a4aa5ea63f Use fusion instead of motif.
Change-Id: Ic75ea959ac825efabf0f3a8606dfca4b65fae474
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-02 12:16:49 +01:00