summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Drag leave event is delivered, after re-entering the widget.Prasanth Ullattil2009-07-032-2/+10
| | | | | | | | | | This happens only for widgets with focus frames. Since the mouse location at the time of this event will be outside of the focus frame, we cannot use it to identify the widget. Instead, use the QDragManager's currentTarget() to deliver the drag leave event. Task-number: 252088 Reviewed-by: Norwegian Rock Cat
* Replace usage of the old, obsolete PrintDlg with PrintDlgEx.Trond Kjernaasen2009-07-031-33/+46
| | | | | | | | Since we don't support Windows versions < Win 2000, we can just go ahead and replace usage of the old compat dialog. Task-number: 222417 Reviewed-by: Prasanth
* Enabled double buffering of window surfaces on Windows.Kim Motoyoshi Kalland2009-07-031-1/+1
| | | | | | Without this, QWindowSurface::flush() doesn't work. Reviewed-by: Samuel
* Fix QX11Embed* with x86_64 by reading prop_return as long.Riku Palomäki2009-07-031-3/+3
| | | | | | | | | | Even though the _XEMBED_INFO property uses 32 bit values, prop_return has 64-bit padded values in 64-bit applications, see man XChangeProperty. Without this fix the XEMBED client will read XEMBED_MAPPED wrong and unmap (hide) itself. Merge-request: 797 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* QToolBar: avoid repaints when entering/leaving a toolbarThierry Bastian2009-07-031-0/+4
| | | | | | HoverEnter/Leave now do nothing. Task-number: 256103
* doc: Corrected several qdoc warnings.Martin Smith2009-07-034-6/+22
|
* Do not specify the output file when generating Visual Studio ProjectKeith Isdale2009-07-031-1/+1
| | | | | | | Files files with qmake. The correct file extension for generated file is best left to qmake to decide.
* Fixed compile of QtCore with some exotic GNU toolchains.Rohan McGovern2009-07-031-1/+1
| | | | | | | | | | Fixes: corelib/kernel/qcore_unix_p.h:127: error: `O_CLOEXEC' undeclared Some toolchains claim to provide glibc >= 2.4 but do not define O_CLOEXEC. An alternative fix might be to define O_CLOEXEC ourselves as we do with some of the system call numbers.
* QPlainTextEdit pixel dust redrawing problem on clear()mae2009-07-021-3/+2
| | | | | With document margins, the mapping from content-coordinates to visual coordinates went wrong.
* Benchmark test for quaternion multiplication.Ariya Hidayat2009-07-022-0/+130
| | | | Reviewed-by: Rhys Weatherley
* Refactored gesture apiDenis Dzyubenko2009-07-02130-17868/+968
| | | | | | | | | | | | | | | | Rewritten the api almost from scratch, making it simplier and more flexible at the same time. The current implementation will not have complex gseturemanager class inside Qt, but the QGesture base class, which represents both a gesture recognizer and a gesture itself with a set of properties. A set of common gestures that can use used in third-party applications (and in Qt itself internally) is supposed to be found in qstandardgestures.h, and a base class for user-defined gestures is in qgesture.h Gesture implementation for Pan on Windows7 has also been added as a reference implementation for platform gestures.
* Don't insert text into a text widget when a modifier is pressed.Denis Dzyubenko2009-07-022-2/+4
| | | | | | | | For example when an unhandled key sequence (i.e. that has now shortcut assosiated with it) like Alt-L is pressed, we shouldn't insert the 'L' text from the QKeyEvent::text() into the text widget. Reviewed-by: Thomas Zander
* Correct #include path for qcore_unix_p.hThiago Macieira2009-07-021-1/+1
|
* Use void* in the read/write replacementsThiago Macieira2009-07-021-2/+2
| | | | That's what unistd.h uses: void* can receive any pointer, while char* can't
* QHeaderView: the sizeHint for section now takes the indicator intoThierry Bastian2009-07-021-1/+1
| | | | | | account for all sections is sorting is enabled. Task-number: 208320
* Fix build with MSVC2003: apparently the code path I thought was Unix was ↵Thiago Macieira2009-07-021-3/+3
| | | | also older MSVC
* Don't compile the FD_CLOEXEC-safe accept4 call if we don't know about ↵Thiago Macieira2009-07-021-1/+1
| | | | SOCK_CLOEXEC
* Revert "Add support for creating the object alongside the Data structure in ↵Thiago Macieira2009-07-022-147/+2
| | | | | | | | | | | | | | | | QSharedPointer" This reverts commit fb51a10ee0451274a430227566ae26efb2ac4474. Sorry, it didn't work. I can fix the MSVC error, but the problem is that older GCC versions (4.2) fail with the following code: template<typename T> struct Buffer { char buffer[128] __attribute__((aligned(__alignof__(T)))); }; The same works fine in GCC 4.4.
* These files don't have to have CRLF line-termination.Thiago Macieira2009-07-023-16/+14
| | | | The other files here don't, so I see no reason why these should
* Experimental: allow QSharedPointer to be used with forward declarations that ↵Thiago Macieira2009-07-029-13/+224
| | | | | | | | | | | | | are declared in this file. The one-definition rule allows the forward declaration appearing below to apply to code that was earlier. Therefore, if the compiler finds out how to delete the object, we can allow a QSharedPointer of a forward- declared-type. This means the actual problem is just a warning with g++. To catch the error, we need a separate .cpp file and I'd rather run this as an external test.
* Add support for creating the object alongside the Data structure inThiago Macieira2009-07-022-2/+147
| | | | | | | | | one go. This avoids one memory allocation. Currently, we only support calling the default constructors. I will *NOT* implement argument passing for C++03. I will implement it with rvalue references for C++0x-capable compilers.
* Add qobject_cast for QSharedPointer.Thiago Macieira2009-07-024-0/+233
| | | | | | | | | This obviously only works for classes that derive from QObject. And you must remember that QSharedPointer controls the QObject's lifetime, not the QObject parent-child relationship. Reviewed-by: dt Reviewed-by: Bradley T. Hughes
* Use the safe versions of the network system calls I have just added.Thiago Macieira2009-07-027-49/+88
| | | | Reviewed-By: ossi
* Add the support for the EINTR- and CLOEXEC-safe network calls too.Thiago Macieira2009-07-022-1/+155
| | | | | | | | The SOCK_NONBLOCK, SOCK_CLOEXEC and accept4(2) calls are Linux-specific. Other platforms get the same behaviour through emulation. Reviewed-By: ossi
* Port gui/embedded to the EINTR-safe functions.Thiago Macieira2009-07-0220-84/+118
| | | | | | | I think I found two file descriptor that aren't closed. One seems like a genuine leak, the other seems intentional. Reviewed-By: ossi
* Add a properly-safe version of select(2).Thiago Macieira2009-07-024-90/+165
| | | | | | | | Do the timeout handling the right and cross-platform way. The code that was in QProcess worked only on Linux, where the kernel sets the remainder in the returned timeval structure. Reviewed-By: ossi
* Port QProcess to use the EINTR-safe and thread-safe functionsThiago Macieira2009-07-021-148/+65
| | | | Reviewed-By: ossi
* Use the safe versions in these system calls I've just introduced.Thiago Macieira2009-07-025-24/+33
| | | | Reviewed-By: ossi
* Make the inotify_init call also use FD_CLOEXEC-safe version of theThiago Macieira2009-07-021-3/+37
| | | | | | system call Reviewed-By: ossi
* Port most uses of ::open and QT_OPEN to the safe version.Thiago Macieira2009-07-026-25/+24
| | | | | | | This ensures that we're calling the open64 version of this function as well as handling the O_CLOEXEC flag and EINTR errors. Reviewed-By: João Abecasis
* Add qcore_unix_p.h containing mostly safe versions of Unix functions.Thiago Macieira2009-07-022-0/+247
| | | | | | | | | | | | | | | Most of these functions are from unistd.h and need to have a loop around the actual call because the calls can be interrupted by a signal delivery. Some special calls (open, dup2, pipe) require an extra flag to support thread-safe execution: the file descriptor must be created from the operating system with the FD_CLOEXEC flag already set. The O_CLOEXEC flag is specified in POSIX.1-2008, but the rest is Linux-specific. Reviewed-By: João Abecasis
* Doc: indicate that these methods are added in 4.6Thiago Macieira2009-07-021-0/+2
|
* Merge branch 'research/qdbus-improvements'Thiago Macieira2009-07-0233-331/+2074
|\
| * Implement a support for getting return arguments out of invokeMethodThiago Macieira2009-07-022-9/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with QDBusInterface. The problem was that I didn't know how to implement the operator= for all types. But it turns out that this was possible all along: the only types I have to implement the operator= for are the basic types, which are already demarshalled. The complex types are left in QDBusArgument semi-demarshalling, but we have QDBusMetaType::demarshall, which takes a void* to an already-constructed type and demarshalls into it. That's exactly what the doctor ordered. Task-number: 206765 Reviewed-By: Marius Bugge Monsen
| * Replace internalPropGet and internalPropSet with the QObject versions in ↵Thiago Macieira2009-07-022-15/+12
| | | | | | | | | | | | | | | | QDBusAbstractInterface. They're now good enough and as fast. Reviewed-By: Marius Bugge Monsen
| * Autotest: add tests for checking variant propertiesThiago Macieira2009-07-024-2/+60
| |
| * Improve the code a bit more by using the variant that QMetaProperty creates.Thiago Macieira2009-07-022-43/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This works for the case of complex types that have to be demarshalled. We don't need to instantiate a new type because QMetaProperty has already done that for us. Also, fix the handling of properties of type variant. I have verified as well that the sending of those properties on the wire use a double-variant encoding (i.e., a variant containing a variant containing some data, the same that Qt 4.5 uses). It's a bit pedantic and it's hard to use when reading stuff, because you get a QVariant containing a QDBusVariant which contains data, but I can't change this anymore. Reviewed-By: Marius Bugge Monsen
| * Autotest: Add property-setting and getting tests to QDBusInterfaceThiago Macieira2009-07-021-2/+100
| |
| * Autotest: Add testing of QDBusAbstractInterfaceThiago Macieira2009-07-028-0/+937
| |
| * Autotest: add tests for method call errorsThiago Macieira2009-07-021-2/+103
| |
| * Autotest: make sure we create the QDBusInterface after the object exists.Thiago Macieira2009-07-021-9/+12
| | | | | | | | | | | | | | | | | | The current code allows making calls to QDBusInterface objects that failed to introspect. It's technically a valid condition. You won't be able to connect to signals, get or set properties, but making calls was possible. I don't know if I want to keep this change in behaviour.
| * Fix setting of complex/custom properties and error messages.Thiago Macieira2009-07-021-31/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Complex properties require demarshalling before passing on to QMetaProperty::write(). We can't pass on a QVariant containing an un-demarshalled QDBusArgument. So add a new function that does the decoding properly, as well as error checking. Also take the opportunity to properly check the interface name in the case of setting a property exported from the object itself (not an adaptor). Task-number: 240608 Reviewed-by: Marius Bugge Monsen
| * Use an "int status" extra parameter in property reading/writing.Thiago Macieira2009-07-025-32/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling qt_metacall with the ReadProperty or WriteProperty, the data is on argv[0] like it was before, but now the QVariant itself is on argv[1] and there's an extra parameter in argv[2] which the meta code can use to indicate result. This allows QtDBus to process properties much more easily. In the case of property reading, we need to be able to modify the variant itself, because copying types when we don't have the data isn't very easy. As for setting, we need to be able to tell setProperty to return true or false depending on whether we succeeded in setting the property or not. Reviewed-By: Kent Hansen Reviewed-By: Marius Bugge Monsen
| * Avoid revalidating message parameters.Thiago Macieira2009-07-026-31/+55
| | | | | | | | | | | | | | | | | | | | | | This is a small performance improvement when making a call: we don't need to validate what we already know to be valid because we either designed it to be so or because we've already validated. The D-Bus library unfortunately validates again and there's nothing we can do about it. But we can avoid doing it twice in our own code. Reviewed-By: Marius Bugge Monsen
| * Keep creation failure errors for QDBusAbstractInterface.Thiago Macieira2009-07-025-70/+116
| | | | | | | | | | | | | | | | | | | | | | In case the object creation fails, set isValid to false. This will prevent any outgoing calls to be made with invalid information. In that case, lastError will never change either. This required adding a method to QDBusPendingCall, to be able to create one such object from an existing QDBusError. Reviewed-By: Marius Bugge Monsen
| * Adapt the message-sending code to return error messages from theThiago Macieira2009-07-024-51/+104
| | | | | | | | | | | | marshalling code. Reviewed-By: Harald Fernengel
| * Add support for error messages in the D-Bus marshaller.Thiago Macieira2009-07-022-14/+24
| | | | | | | | Reviewed-By: Harald Fernengel
| * Add central validation code to QDBusUtil.Thiago Macieira2009-07-021-0/+68
| | | | | | | | | | | | | | These tests are useful in QDBusMessage and QDBusAbstractInterface. It avoids having the same messages all over the place. Reviewed-By: Harald Fernengel
| * Add some new error codes for indicating invalid D-Bus parameters.Thiago Macieira2009-07-022-2/+15
| | | | | | | | | | | | | | I'm wondering if I should be adding com.trolltech.QtDBus stuff now. But since there's already one there, I don't see why not... Reviewed-By: Harald Fernengel
| * Add a function to check if an interface is implemented by an object.Thiago Macieira2009-07-024-46/+51
| | | | | | | | | | | | | | Also reorganise a bit, moving the function to create the interface name from an object's class name to qdbusmisc.cpp too. Reviewed-By: Trust Me