summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* New Qt logoAlessandro Portale2014-11-053-0/+0
| | | | | | | | | | | | | This patch replaces the old Qt logo with the new, flatter one. The PNGs were optimized via: optipng -o7 -strip "all" Task-number: QTBUG-41685 Change-Id: I51983a45144373bf7aee31a32990ecbb2582f488 Reviewed-by: Robert Loehning <robert.loehning@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Rcc: ensure enough space for the embeddedhjk2014-11-051-0/+2
| | | | | | | | | The two-pass feature depends on the QRC_DATA signature that needs to be stored in the array later overwritten by the embedded data. Task-number: QTBUG-42359 Change-Id: Ida1ccff40dda28f92a4267f86f48ee96d62bd214 Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* Define the Intel compiler and Microsoft C++ versions in the Q_CC_ macrosThiago Macieira2014-11-051-3/+3
| | | | | | | | | This is for completeness, since we've done the same for Q_CC_GNU and Q_CC_CLANG. We won't really use the macros like this because both __INTEL_COMPILER and _MSC_VER are readily usable. Change-Id: I669c60166fa4839d43f84f339e6896321d62817f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Store the GCC version number in Q_CC_GNUThiago Macieira2014-11-054-16/+16
| | | | | | | | | | | The sequence of (__GNUC__ * 100 + __GNUC_MINOR__) was used in quite a few places. Simplify it to make the code more readable. This follows the change done for Clang, which was quite necessary since Apple's version of Clang has different build numbers. Change-Id: I886271a5a5f21ae59485ecf8d140527723345a46 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Define Q_CC_CLANG to be the version of upstream Clang that's in useTor Arne Vestbø2014-11-053-11/+26
| | | | | | | | | | | | We map the Apple Clang versions to upstream, so that we have one define to compare against. Fixes build break on iOS due to qbasicatomic.h not defining QT_BASIC_ATOMIC_HAS_CONSTRUCTORS on Apple Clang versions, which is needed after 1e9db9f5e18123f2e686c10b Change-Id: I17493c0187c20abc5d22e71944d62bfd16afbad2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix too many resizes and move events for native widgetsJørgen Lind2014-11-044-20/+50
| | | | | | | | | | | | | | | When the QWidgetWindow receives a resize or move event, it should check with the widget if its crect already has this geometry. if not then send the resize or move event Ideally events should be sent whenever the QWidgetWindow receives them. QTBUG-42383 is created for this problem Task-number: QTBUG-29937 Task-number: QTBUG-38768 Task-number: QTBUG-30744 Change-Id: I1e9a5d25de29a98885edece927ba14d7a763eb01 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* qdoc: Delayed the examples manifest file creationVenu2014-11-041-3/+1
| | | | | | | | | This avoids the creation of demos-manifest.xml if there are no demos in the repo. Change-Id: I4d3bbe4540f4b1532c0d51f62b8d1494864a7b1c Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Check the Q_SCRIPTABLE tag of signals and slots as early as possible.Robert Griebl2014-11-041-0/+6
| | | | | | | | | This makes is possible to generate a valid D-Bus XML from a class that has e.g. internal slots with pointer parameters by explicitly marking all D-Bus exports with Q_SCRIPTABLE and running qdbuscpp2xml with the '-a' switch. Change-Id: Iab32a0a7f46f2516f6385808bbf35b26c7708b1a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use __aarch64__ instead of __arm64__ to detect AArch64Tor Arne Vestbø2014-11-041-2/+2
| | | | | | | | | | The latter name was used by Apple in their internal AArch64 LLVM backend, but has since been merged into LLVM upstream and renamed to AArch64. https://github.com/llvm-mirror/llvm/commit/29f94c72014eaa5d0d3b920686e68 Change-Id: I319f42f07c95dfbcd121134fbe6e554e2d36453d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't delete QLibrarySettings configuration in ~QCoreApplicationKai Koehne2014-11-041-9/+1
| | | | | | | | | | | | Do not clear the QLibrarySettings configuration information already in ~QCoreApplication (via qAddPostRoutine). This fixes issues where multiple QCoreApplication objects are created over time (in plugins). Task-number: QTBUG-34290 Change-Id: Ib5c58f825619ede484492e057e08d73b2b4c6101 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix tab icon vertical alignmentMarko Kangas2014-11-041-1/+1
| | | | | | | | | | | | Fixes case if custom icon size is given and height is more than width. Check of minimum valid height was compared wrongly to width and caused invalid vertical alignment. After fix vertical alignment is correct aligned to vertical center with the tab text. Change-Id: I6c4a710b15e91225edeabb629bfea7049ab2f42a Task-number: QTBUG-42143 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
* Android: Fix more exceptions in ExtractStyle.java on Android LBogDan Vatra2014-11-031-11/+44
| | | | | | Task-number: QTBUG-40120 Change-Id: I949f19ced4eefcf7a40e64ad63e316765c6f2f48 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Prevent a leak of QXcbXSettingsPrivateGiuseppe D'Angelo2014-11-033-0/+8
| | | | | | | | | | The private was not deleted. Adding the dtor in turn causes a warning about not having a virtual dtor in the base class, so add that as well. Change-Id: I24a90caf2cf6192a6f17cf5af96b8f77010d9127 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Windows: Ignore key Shift+F10 unless a shortcut is registered for it.Friedemann Kleint2014-11-031-1/+10
| | | | | | | | | This key combination should open the context menu. Task-number: QTBUG-40085 Change-Id: I7cfc89f766b3734b9fb9d3c9135b4896ffbadb5b Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Fix a fatal Clang warning on LinuxGiuseppe D'Angelo2014-11-031-2/+2
| | | | | | | | | | | | | | Two fromstrerror_helper overloads are defined, to manage the fact that strerror_r returns an int or a char* depending on the system. The problem is that then only one overload used (again, depending on the actual stderror_r return type), leading to one of the two overload to be unused and thus triggering the unused function warning. kernel/qsystemerror.cpp:64:27: error: unused function 'fromstrerror_helper' [-Werror,-Wunused-function] static inline QString fromstrerror_helper(int, const QByteArray &buf) Change-Id: I6a1c8e1a4b7d14068b682db26002ff68ad36167c Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* iOS: Allow virtual keyboard returnKeyType to be set through IM platformDataTor Arne Vestbø2014-11-032-4/+7
| | | | | | | | | The result of pressing the key is still a Qt::Key_Return press/release sequence, which needs to be handled manually. Change-Id: I72c7b0067bd3ec1bc315ab2c84361800b7be0943 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Marius Bugge Monsen <marius@cutehacks.com>
* iOS: Be more thorough when looking for current first responderTor Arne Vestbø2014-11-031-1/+21
| | | | | | | | | | | The technique of sending an action does not always end up at the actual first responder, but it will end up in a responder in the responder chain of the first responder, so we continue searching the subviews recursively until we find the real first-responder. Change-Id: I6abc9bc18eb127fa4b317cd308783c0ecfcd670a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Make QIOSTextInputResponder a proper first-responder during text inputTor Arne Vestbø2014-11-034-10/+105
| | | | | | | | | Instead of faking it, by returning YES for isFirstResponder, which caused issues when iOS would try to dismiss the keyboard by resigning the true first-responder. Change-Id: I816c4cf9c699d72995ce7968e1f1a4aa9c9c167e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* QFileDialog: prevent section collapsing in the main selection areaGiuseppe D'Angelo2014-11-033-1/+7
| | | | | | | | | | | | | | | | | | In the non-native QFileDialog, a QSplitter separates the two central views (the list view of "places" and the tree view for navigating the file system). Unfortunately, that splitter allows sections to be collapsed, resulting in a weird status where the user doesn't understand what has just happened and thinks that (s)he may have broken something. Worse, that gets actually saved into the application settings, so the splitter may stay collapsed forever. Instead, let's simply prevent sections from being collapsible. Task-number: QTBUG-19467 Change-Id: I11ff7c55a5535680a3edce5f4e70c9338291b94f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Regenerate qfiledialog_embedded.uiGiuseppe D'Angelo2014-11-031-96/+108
| | | | | | | | The old designer generator inserted stray spaces etc.; save it again with the new designer to fix those. Change-Id: I3890dd942970d9da71582ccb70b75d59888304bf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Android: Fix input method hints.Christian Strømme2014-11-031-16/+19
| | | | | | | | | | | | 1. Add comment about the magic TYPE_NUMBER_VARIATION_PASSWORD value. 2. ImhHiddenText, ImhNoPredictiveText and ImhSensitiveData should all disable suggestions. 3. Only ImhSensitiveData sets TYPE_TEXT_VARIATION_VISIBLE_PASSWORD 4. Don't OR date and time to get DateTime... Task-number: QTBUG-38080 Change-Id: If456563983130e9af409ffa8cb717ddf259f1d6b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Remove AttachedJNIEnv class.Christian Strømme2014-11-032-48/+4
| | | | | | | | | | | The JNI environment should be managed by QJNIEnvironmentPrivate directly or through QJNIObjectPrivate. There is also a clear difference between calls coming from or going into Java code. Calls coming from Java already comes with the 'right' environment and in most cases no extra considerations or set-up is needed. Change-Id: I92d935ddfb70332041869185d5a92438930ff9b9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Simplify the jni code in QtAndroidMenuChristian Strømme2014-11-033-24/+8
| | | | | | | | This is one of several fixes where the goal is to simplify the jni code by letting QJNI manage the environment. Change-Id: Ia714e25fbb3fcd170150392e822b0a3fc3812818 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Simplify the jni code in QtAndroidInputChristian Strømme2014-11-031-42/+17
| | | | | | | | Let the QJNI classes manager the jni environment and caching of jni handles. Change-Id: I8c238375026adf449d6e6e2b521caa6cd63a0fb4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Add runOnUiThread() functionChristian Strømme2014-11-033-0/+53
| | | | | | | | Enables QRunnables to be run on the UI thread. For now this function is only intended for internal consumption. Change-Id: I5e2abb06104219a9dd55b3308113056e4da5fa07 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Don't build or use qt_convert_rgb888_to_rgb32_neon on ARM64/AArch64Tor Arne Vestbø2014-11-033-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The assembly code doesn't build on that architecture yet: qimage_neon.cpp:78:17: error: vector register expected "vld3.8 { d0, d1, d2 }, [%[SRC]] !\n\t" ^ <inline asm>:1:15: note: instantiated into assembly here vld3.8 { d0, d1, d2 }, [x1] ! ^ qimage_neon.cpp:78:57: error: unrecognized instruction mnemonic "vld3.8 { d0, d1, d2 }, [%[SRC]] !\n\t" ^ <inline asm>:2:2: note: instantiated into assembly here vswp d0, d2 ^ qimage_neon.cpp:79:31: error: vector register expected "vswp d0, d2\n\t" ^ <inline asm>:3:15: note: instantiated into assembly here vst4.8 { d0, d1, d2, d3 }, [x8,:64] ! ^ Change-Id: I8fe93b3940d971c0aed5973fe6e1a5e2f362df3c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: corrected wrong equivalent of obsolete QGraphicsItem::rotateNico Vertriest2014-11-031-1/+1
| | | | | | Task-number: QTBUG-39027 Change-Id: Icb5998a4e28edbc6952bc79d970c5ce6dbe57d69 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Doc: corrected autolink issue animationNico Vertriest2014-11-031-1/+1
| | | | | | Task-number: QTBUG-40362 Change-Id: If89a8ae6aeecd4060a34f987baaf55c12439e7ea Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* WinRT: Set WindowTitle in application switcherMaurice Kalinowski2014-11-032-0/+28
| | | | | | | | Add platform backend for QWinRTWindow::setWindowTitle. Task-number: QTBUG-40736 Change-Id: I0b03c9b5977368b38ba63044b00178c3f2bb0b86 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Store clipboard before exiting native GTK dialogGatis Paeglis2014-11-031-0/+1
| | | | | | | | | | | | | | Gtk library usually takes care of this when the main Gtk loop ends, but since Gtk's main even loop is not used in QGtk2Dialog we have to store clipboard's content with help of gtk_clipboard_store(). This function sends a SAVE_TARGETS request to X11 clipboard manager to save clipboards contents as required by ICCCM. Task-number: QTBUG-34475 Change-Id: If784c425ea4a36ec1c3a8ddc0cdec080f57681a5 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix warning about unused variable in qprintengine_win.cpp.Friedemann Kleint2014-11-031-2/+0
| | | | | | | | qglobal.h:979:34: warning: unused variable 'q' [-Wunused-variable] ^ kernel\qprintengine_win.cpp:719:5: note: in expansion of macro 'Q_Q' Change-Id: I7fbad6c8341a3df1a06d3914209dec22876a2f09 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* QMacStyle: More tweaks for editable QComboBoxGabriel de Dietrich2014-11-021-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | Note that at one point we need to use Cocoa to render the combo box, but only if we're dealing with Qt Quick controls. Also worth noticing, there's currently a bug in Cocoa when rendering inactive combob boxes. We faithfully reproduce it in Qt for now. We'll fix it when Apple does. Finally, we need to start constraininig the combo boxes height. Cocoa has not supported variable height combo boxes for years, and will even spit the following warning if we try to do something smart. This application is trying to draw a very large combo box, 28 points tall. Vertically resizable combo boxes are not supported, but it happens that 10.4 and previous drew something that looked kind of sort of okay. The art in 10.5 does not break up in a way that supports that drawing. This application should be revised to stop using large combo boxes. This warning will appear once per app launch. Task-number: QTBUG-40833 Task-number: QTBUG-42067 Change-Id: I6512a6a581d446a28585db22fe4dbeac09499321 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QAndroidPlatformClipboard: fix build in release modeJ-P Nurmi2014-11-011-2/+3
| | | | | | | Q_ASSERT expands to nothing in release => mode unused. Change-Id: Ieb9ec4382e925250e1146239ce061763003ff6ba Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Always invalidate the iOS accessibility cacheJan Arve Sæther2014-11-011-10/+10
| | | | | | | | | | | | | | | | | | | This was observed in the weather app, where sometimes we could not find an items window. This could only be observed in the search results of the cities. (while VKB was visible). The old code traversed up to the QQuickListView and then it could not traversed further up in the parent hierarchy. Because of this it could also not find the associated window handle. The reason for this is unknown, but maybe it could be related to the fact that QQuickListView is a Component. Regardless of this, invalidate the cache should invalidate everything. We also traverse through all top level windows, but on iOS there should not be too many top level windows... Change-Id: I56a496435bb529a53d5ece8446cd2eeff502af84 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Enable C++11 atomics with ClangThiago Macieira2014-10-311-1/+3
| | | | | | | | I don't know why it was an #if 0. The __has_feature has been there for a while. But, just to be sure, we check the presence of the header too. Change-Id: I36e34c9e8fd4ce55c98966d2fad246b77eb16597 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix compilation of <atomic> with ICC and libc++Thiago Macieira2014-10-311-0/+7
| | | | | | | | | | | | | The libc++ header does this: #if !__has_feature(cxx_atomic) #error <atomic> is not implemented So we can't enable the feature until the compiler reports true for that test. Change-Id: I96f1c7eea8b93d93bd721fe5a85fa987339d091f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make QTestEventLoop::exitLoop() thread-safeRoland Winklmeier2014-10-311-0/+7
| | | | | | | | | | | | | | | | | | | QTestEventLoop::exitLoop() is used by QSignalSpy to stop event processing when the connected signal has been received. The design of QSignalSpy requires QTestEventLoop::exitLoop() to be thread-safe, which it wasn't. When QSignalSpy is connected to a signal in a different thread, exitLoop() was called from the thread which emitted the signal and not the one in which QTestEventLoop is running. This caused troubles when killing the internal timer. This patch adds a check in the beginning of exitLoop(). If it is called from a different thread, it will post an event into the message queue in which QTestEventLoop is running and execute it there. Change-Id: Icb8c8ff2f5344800ee6c6125b98c677c7a196c32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove unused variableLars Knoll2014-10-311-1/+0
| | | | | | | Also fixes a compiler warning with clang Change-Id: I99beb7e099477b2b8b53af0e9fd32a7605a6c08a Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Cleanup: Remove some obsolete code supporting a pre-4.3 formatLars Knoll2014-10-314-32/+16
| | | | | | | | Loading a dock window state saved by a Qt 4.2 app is not something we need to support anymore. Change-Id: I9ee6e2c742b31114081852e7236cfc8696b9b270 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* iOS: Make sure we update hints and platform data on IM enable/disableTor Arne Vestbø2014-10-311-0/+9
| | | | | | Change-Id: If4d9c9c769b598a3194a7cd5bbe5c74e7650694b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Mark QMetaMethod and related constructor as constepxrOlivier Goffart2014-10-311-3/+3
| | | | | | | | | qtdelcarative's qquickaccessibleattached.cpp contains now some static instance of QMetaMethod. Marking the constructor as constexpr, let GCC to remove call to the constructor at load time. Change-Id: Ic5ab7db0d06caa08f15d65d3bb5f22a34a111fee Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Lower QVariant::userType call countJędrzej Nowacki2014-10-311-10/+16
| | | | | | | | We know that type id can't be changed, let pass this information to the compiler. Change-Id: I105b460417288b84250a954571c247608976f8f7 Reviewed-by: Stephen Kelly <steveire@gmail.com>
* Windows: Create touch device in initialization.Friedemann Kleint2014-10-313-19/+31
| | | | | | | | | | Previously, the device was delay-created, which is a problem if its type is to be used for determinining the pan gesture type. Task-number: QTBUG-40461 Change-Id: I2dee3d7a3786a0fdf0a9b2b9e174dd121697ab44 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Handle mounts under /runAllan Sandfeld Jensen2014-10-311-4/+3
| | | | | | | | | | | We shouldn't excluded all volumes under /run since some distos will mount filesystems there. Instead we should exclude all filesystems with the type "tmpfs" that /run has, and rpc_pipefs that is mounted below /run. Tmpfs" is excluded for all UNIX systems since the BSDs have a similarly named filesystem. Change-Id: I03fdac515c0bfb1b824b2e3eae1022dd699c0998 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Cocoa plugin - fix a resource leakTimur Pocheptsov2014-10-311-0/+1
| | | | | | | | The patch 916dfcb8275bcce6b39606cd0b930239a60dc5df while fixing one problem, introduced another - leaking CGImage. Change-Id: I08db6ea9fa97ae3489a0bfa1f93e0d18f3671885 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QShapedPixmapWindow: do not leak the backing storeGiuseppe D'Angelo2014-10-312-0/+7
| | | | | | Change-Id: Id7cc8cbbcd62c546055d525473f90d2bad0c144a Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix warnings about size conversion in QListThiago Macieira2014-10-312-20/+23
| | | | | | | | | | | Because difference_type is 64-bit on 64-bit systems, there's a downconversion warning from MSVC and possibly other compilers when it gets passed to functions taking simply int. Task-number: QTBUG-41092 Change-Id: I46a710810f4a57b8b84c4933f419a1f1fdf6bb5a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Report the system error on why chmod(2) failed in XDG_RUNTIME_DIRThiago Macieira2014-10-311-1/+2
| | | | | | | | | | | | This is a very rare occurrence: if the user is the owner of the directory, the user can chmod(2), and we already checked that the user is the owner. However, chmod(2) can still fail on read-only fs and on hardened systems. Task-number: QTBUG-41735 Change-Id: I8f8bac763bf5a6e575ed59dac55bd265e5b66271 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Don't always chmod the XDG_RUNTIME_DIRThiago Macieira2014-10-311-1/+3
| | | | | | | | | | Since the current user is the owner of the dir, we'll get 0x7700 as permissions, not just 0x700. With the wrong check, we were always doing an unnecessary chmod. Task-number: QTBUG-41735 Change-Id: Ib1fc258fef4bf526baa9c71201f9b78d36f5454f Reviewed-by: David Faure <david.faure@kdab.com>
* Attempt to make QFile I/O 64-bit safeThiago Macieira2014-10-313-22/+39
| | | | | | | | | | | | | | | | | | | | | Use qint64 wherever possible. The linear buffer is never requested to allocate that much memory (always limited), but at least we ensure we're not dropping bits where we shouldn't. Windows's POSIX compatibility layer is never largefile enabled, so it is always necessary to chunk large reads and writes. On Unix, this will be rare, unless someone passed -no-largefile to configure, for some weird reason. Unfortunately, this is not testable, unless we can allocate a buffer with 4 GB or more in size. The test for this would be to open a file we know to be small, then try to read 4 GB + 1 byte. If everything works correctly, we'll read the full file; if there was a truncation, we'd read one byte. Change-Id: If3ee511bf1de17e0123c85bbcaa463b9972746ce Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>