1Qt 5.8 introduces many new features and improvements as well as bugfixes 2over the 5.7.x series. For more details, refer to the online documentation 3included in this distribution. The documentation is also available online: 4 5 http://doc.qt.io/qt-5/index.html 6 7The Qt version 5.8 series is binary compatible with the 5.7.x series. 8Applications compiled for 5.7 will continue to run with 5.8. 9 10Some of the changes listed in this file include issue tracking numbers 11corresponding to tasks in the Qt Bug Tracker: 12 13 https://bugreports.qt.io/ 14 15Each of these identifiers can be entered in the bug tracker to obtain more 16information about a particular change. 17 18This release contains all fixes included in the Qt 5.7.1 release. 19 20**************************************************************************** 21* License Changes * 22**************************************************************************** 23 24 Static libraries that are linked into executables (winmain and 25 qopenglextensions) are now licensed under BSD _and_ commercial licenses. 26 27**************************************************************************** 28* Deprecation Notice * 29**************************************************************************** 30 31 - The following platforms or toolchains are deprecated and will be 32 removed as of Qt 5.9: 33 * Apple OS X Mavericks (v10.9) 34 * Apple iOS 7.x 35 36 Deprecated platforms and toolchains continue to work until removed. 37 38 - The Q_OBJECT_CHECK macro is deprecated and will be removed in Qt 6. The 39 internal, template function qt_check_for_QOBJECT_macro that it created in 40 QObject-derived classes will be removed in Qt 5.9. 41 42**************************************************************************** 43* Important Behavior Changes * 44**************************************************************************** 45 46 - Support for the following platforms was removed in this version: 47 * Apple OS X Mountain Lion (v10.8) 48 * Apple iOS 6.x 49 50configure & build system 51------------------------ 52 53 - The configuration system has been rewritten almost from scratch. This 54 improved the consistency between builds on Unix and Windows, but some 55 subtle unintended behavior changes are also possible. Also, some 56 obsolete options have been entirely removed and will now cause errors. 57 - It is not permissible any more to manually #define QT_NO_<FEATURE> 58 anywhere. Instead, configure's -no-feature-* options must be used. 59 Note that this does not apply to defines which modify behavior rather 60 than entirely removing features. 61 - Configure test results are now cached. Use -recheck or -recheck-all 62 to discard them. 63 - [QTBUG-32530][QTBUG-42962] The Unix configure won't pick up CFLAGS and 64 related environment variables any more. Instead, it now accepts QMAKE_* 65 variable assignments on the command line. 66 - [QTBUG-52266] Configure won't pick up QMAKESPEC from the environment 67 any more. Use the -platform option instead. 68 - Device and simulator libraries are now combined on Apple device 69 platforms (iOS). This means that there will no longer be any 70 *_simulator.a libraries and the simulator architectures will simply 71 reside alongside the device architectures in a single Mach-O file. 72 - [Darwin] Project files may not override QMAKE_MAC_SDK any more. 73 74QtCore 75------ 76 77 - qFatal will now use std::abort to terminate the application on all 78 operating systems. Previously, ::abort() or ::exit(1) were called, 79 depending on the operating system. 80 - QLibraryInfo::licensee()/licensedProducts() were deprecated and 81 return empty strings now. 82 - Destroying a QThread which is still running will now result in 83 immediate and abnormal program termination. 84 85QtGui 86----- 87 88 - [QTBUG-54936] QFont::toString() and QFont::key() were modified to save 89 the font's style name if one is set, invalidating any stored font 90 identifiers. QFont::fromString() was also adjusted to accommodate the 91 change. 92 93QtNetwork 94--------- 95 96 - Proxies from system settings will now be used by default. Configure 97 with -no-system-proxies to disable. 98 - [QTBUG-53649] libproxy is now turned off by default. Configure with 99 -libproxy in order to enable it again. 100 101**************************************************************************** 102* Library * 103**************************************************************************** 104 105QtCore 106------ 107 108 - Disambiguated the relational operators comparing QByteArray with 109 QStringRef (and vice versa). 110 - Added qHash() overloads for QHash, QMultiHash. 111 - Added QDeadlineTimer, a counterpart to QElapsedTimer, used to mark a 112 time point in the future (a deadline) and determine whether such a 113 deadline has passed. 114 - Qt now relies on type traits from the C++11 standard library. 115 - [QTBUG-54981] Added Q_NAMESPACE, which can be used to add Q_ENUM_NS/ 116 Q_ENUMS, Q_FLAG_NS/Q_FLAGS and Q_CLASSINFO to a namespace. 117 - Q_IS_ENUM was deprecated. Use std::is_enum<>::value instead. 118 119 - QChar: 120 * Added missing operator{<,>,<=,>=} comparing against QLatin1String and 121 QStringRef. 122 * Added missing operator{==,!=} comparing against QLatin1String. 123 124 - QCommandLineOption: 125 * Added flags() and setFlags() methods. Added ShortOptionStyle and 126 HiddenFromHelp flags. 127 128 - QDateTime: 129 * Introduced toSecsSinceEpoch, fromSecsSinceEpoch and setSecsSinceEpoch 130 functions, which use 64-bit integers to represent the number of 131 seconds. 132 * The toTime_t, fromTime_t and setTime_t functions are deprecated and 133 will be removed in Qt 6.0. For new code, use the equivalent functions 134 with "SecsSinceEpoch" in the name, or the equivalent ones with 135 millisecond accurancy that have existed since Qt 4.7. 136 * Added string formatting type Qt::ISODateWithMs. 137 138 - QFileInfo: 139 * QFileInfo now reports file times with millisecond precision on Unix 140 systems. 141 142 - QFileSystemWatcher: 143 * [QTBUG-55896] Fixed a bug that caused QFileSystemWatcher to mis-handle 144 file paths that contained non-US-ASCII characters on Apple platforms. 145 146 - QJsonDocument: 147 * [QTBUG-39751] fromVariant can now take a QVariantHash argument. 148 * Fixed a number of bugs that could cause crashes when loading corrupt 149 binary JSON data. 150 151 - QJsonValue: 152 * [QTBUG-43077] QJsonValue(Null).toVariant() now returns a QVariant of 153 type QMetaType::Nullptr instead of an invalid QVariant. 154 155 - QLatin1String: 156 * Added at(), operator[](), mid(), right(), left(). 157 158 - QLibraryInfo: 159 * Added QLibraryInfo::version(), which returns the current version of 160 the Qt library as a QVersionNumber object. 161 162 - QLine/QLineF: 163 * Added center(). 164 165 - QLockFile: 166 * Fixed a bug that caused QLockFile to over-sleep while waiting for the 167 lock file to become available. 168 169 - QMetaType: 170 * std::nullptr_t is now a built-in Qt metatype. 171 172 - QModelIndex: 173 * QModelIndex::child has been deprecated due to its lack of generality. 174 Use model->index(row, column, index) instead. 175 176 - QMutex: 177 * QMutex now fully models the TimedLockable concept by providing the 178 try_lock, try_lock_for and try_lock_until functions, therefore making 179 it usable in Standard Library lock management classes and functions. 180 181 - QObject: 182 * The QT_NO_NARROWING_CONVERSIONS_IN_CONNECT macro has been added. When 183 using the new connection syntax (PMF-based) this macro makes it 184 illegal to narrow the arguments carried by the signal, and/or to 185 perform floating point to integral implicit conversions on them. When 186 the macro is defined, depending on your compiler a QObject::connect() 187 statement triggering such conversions will now fail to compile. 188 189 - QPersistentModelIndex: 190 * QPersistentModelIndex::child has been deprecated due to its lack of 191 generality. Use model->index(row, column, index) instead. 192 193 - QStringList: 194 * Added join(QLatin1String) overload. 195 196 - QStringRef: 197 * Added missing operator{<,>,<=,>=} comparing against QLatin1String and 198 QString. 199 200 - QSysInfo: 201 * The output of QSysInfo::prettyProductName now includes the Windows 202 OS/kernel version number. In case of future versions of Windows, a 203 valid string is now returned. 204 205 - QSettings: 206 * [QTBUG-56124] Fixed a bug that caused QSettings to fail on Apple 207 platforms when strings with embedded null (\0) bytes were present 208 209 - QSharedPointer: 210 * [QTBUG-52369] Fixed a bug that caused QSharedPointer to fail to compile 211 if it was initialized with a nullptr literal. 212 * Fixed a bug that made QSharedPointer delete the pointer it held with the 213 wrong destructor if the type of the QSharedPointer and that of the object 214 passed on the constructor were different. Its behavior is now the same as 215 std::shared_ptr. 216 217 - QStandardPaths: 218 * [QTBUG-55507] Fixed the QStandardPaths::FontsLocation on XDG systems to 219 be $XDG_DATA_DIR/fonts. 220 * Fixed handling of potential paths that do not exist on Windows. Now, 221 QStandardPaths may return storage locations that may not exist on all 222 platforms. 223 224 - QTimer: 225 * Added support for std::chrono duration objects for QTimer methods, 226 like QTimer::singleShot and QTimer::setInterval. 227 228 - QWaitCondition: 229 * Added notify_one() and notify_all() to make QWaitCondition be usable from 230 algorithms that use the Standard Library naming convention. 231 232QtDBus 233------ 234 235 - QDBusConnection: 236 * Fixed a bug that would cause QDBusConnection::connect() to return true 237 if a slot was already connected to the same D-Bus signal. QtDBus does 238 not support multiple connections. 239 240QtGui 241----- 242 243 - [QFileDialogOptions/QFontDialogOptions/QMessageDialogOptions/ 244 QColorDialogOptions] These classes no longer have value semantics, but 245 need to be held in QSharedPointer (as they always were). To copy an 246 instance, use the clone() method. 247 - QOpenGLTextureBlitter, a utility class to draw textured quads, has been 248 made public. 249 - [QTBUG-38825] Fixed QTextEdit to match undo functionality of QLineEdit 250 to group two sequential inserts into one undo action. 251 - [QTBUG-51844] Added rotation and uniqueId properties to 252 QTouchEvent::TouchPoint. This is mainly for the benefit of the TUIO 253 plugin so far: it now supports tracking physical objects (fiducials) 254 on the touchscreen surface, as long as the object's ID can fit in a 255 64-bit integer. QPointingDeviceUniqueId is a wrapper for the ID, 256 designed to be extensible to support other types of IDs in the future. 257 - [QTBUG-52510] A stationary touchpoint event is delivered if its 258 velocity changes. This is to ensure that the application will be 259 notified when a TUIO fiducial object comes to rest. 260 - [QTBUG-53076] Add QGuiApplication::applicationDisplayNameChanged() 261 signal. 262 263 - QAbstractTextDocumentLayout: 264 * Added imageAt() and formatAt() methods, which respectively can be used 265 to retrieve the source link of the image under the cursor, or the 266 QTextFormat of the text under the cursor. 267 268 - QFont: 269 * [QTBUG-48043] The default value of QFont::stretch() is now 0 to 270 indicate any default stretch is acceptable. 271 272 - QRegion: 273 * Is now iterable as a container of QRects: added {c,}{r,}{begin,end}(). 274 275 - Text handling: 276 * [QTBUG-51411] Fixed performance hit from showing large QTextDocuments 277 in a QTextEdit or QTextBrowser. (Regression introduced in Qt 5.3.0) 278 * [QTBUG-50090] Fixed line spacing with some scalable fonts containing 279 bitmaps with the Freetype font engine. 280 * [QTBUG-56346] Fixed QStaticText when manually breaking lines and no 281 text width was set. 282 * [QTBUG-56659] Fixed a regression where raster fonts on Windows were 283 detected as smoothly scalable and thus rendering with said fonts in Qt 284 Quick would break. 285 * [QTBUG-51223] Fixed synthesized oblique for non-latin text on 286 platforms using the basic font database, such as Android. 287 * [QTBUG-56672] Fixed list of supported sizes for bitmap fonts on 288 Windows. 289 * [QTBUG-56714] Fixed a bug where a no-break space would sometimes cause 290 the first character of the containing line to not be displayed. 291 * [QTBUG-55856] Fixed rendering of large fonts when a device pixel ratio 292 is set and the Freetype engine is used. 293 294QtNetwork 295--------- 296 297 - Added QNetworkDatagram class, along with new function receiveDatagram() 298 in QUdpSocket that returns it, and an overload to writeDatagram() that 299 can accept it. 300 - Added QSctpServer and QSctpSocket classes. Note that these need to be 301 explicitly enabled via a configure option. 302 - [QTBUG-50956] Added support for HTTP/2 protocol 303 304 - QSslSocket: 305 * [QTBUG-39077] TLS PSK ciphers are possible in server sockets. 306 * It is now possible to set custom Diffie-Hellman parameters for 307 QSslSocket-based servers. 308 309 - QTcpServer: 310 * [QTBUG-51288] It is now possible to use QTcpServer with an externally 311 created QTcpSocket. 312 313QtSql 314----- 315 316 - QSqlDatabase: 317 * When connecting to a MySQL server whose version is 5.5.3 or higher, 318 the default connection charset is now utf8mb4 instead of utf8 to allow 319 4-byte UTF-8 encodings. 320 321 - SQLite: 322 * Added notification feature to SQLite driver 323 324QTestLib 325-------- 326 327 - [QTBUG-44030] Added QTest::createTouchDevice() for use in autotests 328 which generate touch events. 329 - Added ref-cycles perf counter. 330 - QFETCH variables can now be declared const (QFETCH(const T, name)). 331 - It is now possible to use variables of types with an explicit operator 332 bool in the QVERIFY macro. 333 334QtWidgets 335--------- 336 337 - QFormLayout: 338 * [QTBUG-15990] Added removeRow(), takeRow(). 339 340 - QMainWindow: 341 * [QTBUG-56628] Fixed crash using takeCentralWidget when the central 342 widget was not set. 343 344**************************************************************************** 345* Platform-specific Changes * 346**************************************************************************** 347 348 - Added technology preview support for Apple tvOS and Apple watchOS. 349 - Added initial support for Microsoft Visual Studio 2017, which uses the 350 mkspec "win32-msvc2017". Full support will happen after the final release 351 of that compiler. 352 353Android 354------- 355 356 - [QTBUG-48948] Show password while typing is now supported 357 - [QTBUG-55035][QTBUG-50759] Introduced a mechanism to forward 358 permission related callbacks on Activity objects to interested 359 parties. 360 361Apple platforms 362--------------- 363 364 - Added QImage::toCGImage() that returns a CGImage. 365 - Added functions that convert Qt types QPoint/QPointF, QRect/QRectF and 366 QSize/QSizeF to and from CGPoint, CGRect and CGSize. Note that QPoint, 367 QRect and QSize do not provide fromCGXxx functions since that would 368 silently lose precision. 369 370iOS 371--- 372 373 - Precompiled headers are now supported on iOS. 374 - Starting from iOS 10, Apple requires all apps that need access to photos 375 to have the key 'NSPhotoLibraryUsageDescription' in the Info.plist. 376 Therefore, to get the same support in Qt (when, e.g., using a file 377 dialog), the Info.plist assigned to QMAKE_INFO_PLIST will need this key 378 as well. 379 380macOS 381----- 382 383 - Speech to text dictation now works for Qt text input. 384 - [QTBUG-33708] Fixed underline position in font rendering. 385 386Linux 387----- 388 389 - [QTBUG-39959] QWidget-based applications running on the eglfs platform 390 plugin can now request 180 or 90 degrees rotated output by setting the 391 QT_QPA_EGLFS_ROTATION environment variable. 392 - KDE/Gnome themes now implement QPlatformTheme::fileIconPixmap(), showing 393 file icons. 394 395Windows 396------- 397 398 - [QTBUG-31476] QFactoryLoader now filters potential plugins by the 399 ".dll" suffix. 400 - [QTBUG-56239] 'What's this' button is now shown by default only for 401 QWidget dialogs. 402 - [QTBUG-53833] QProcess::startDetached() changed behavior on Windows: 403 it no longer creates a new console window unconditionally, instead it 404 passes the same creation flags to CreateProcess as QProcess::start(). 405 406 - Text handling: 407 * [QTBUG-54740] Fixed embedding fonts in PDF when dpi scaling is active 408 or when the hinting preference was none or vertical hinting. 409 * [QTBUG-47485] Fix selecting non-regular fonts when using the Freetype 410 engine. 411 * [QTBUG-49346] Fixed rendering error when using the MingLiU fonts at 412 certain combinations of pixel size and scale. 413 414**************************************************************************** 415* Tools * 416**************************************************************************** 417 418configure & build system 419------------------------ 420 421 - The -no-feature-* option family was integrated with the rest of the 422 configuration system. Numerous existing features were made optional, 423 and build problems in various reduced configurations were fixed. 424 This is an ongoing effort known as "Qt Lite". 425 - Numerous Qt modules outside qtbase now support configure options. 426 In a module-by-module build, these can be passed to qmake itself, 427 after a -- option. 428 - Introduced the qtConfig(<feature>) qmake function to replace the 429 patterns contains(QT_CONFIG, <feature>) and load(qfeatures)+ 430 contains(QT_DISABLED_FEATURES, <feature>). 431 Likewise, the C++ macro QT_CONFIG(<feature>) was introduced to 432 replace the pattern !defined(QT_NO_<FEATURE>). 433 The old methods are effectively deprecated and will stop working at 434 some point in the near future. 435 - Use of -sysroot will now trigger a cross-build even if -platform and 436 -xplatform are the same. 437 - The JPEG & GIF handlers and the SQL drivers are now always built as 438 plugins, even in static builds (static "plugins" in this case). 439 - [GCC] Include paths from system libraries are now marked as such, 440 resulting in fewer warnings the user cannot do anything about. 441 - [Windows] config.status.bat is now created, like on Unix. 442 - [QTBUG-46974] Fixed location of config.status in top-level builds. 443 - [QTBUG-38792][Unix] The -redo option is now accepted, like on Windows. 444 - It's now possible to add more arguments when -redo is used. Note that 445 these arguments are not saved in turn. Likewise for config.status. 446 - [QTBUG-32896][iOS/clang] Added missing CFBundleIdentifier to library 447 template. 448 - [QTBUG-47624] Fixed abort when some, but not all, XCB dependencies 449 are met. The feature is now disabled instead, as expected. 450 - [QTBUG-50838] The Raspberry Pi EGL detection now uses pkg-config. 451 - [QTBUG-52112][Android] Plugins now have a SONAME, as required by 452 Android 6+. 453 - [QTBUG-54438] Fixed launching tests, examples, and build tools in 454 some configurations. 455 - [QTBUG-56289][GCC@Windows] Fixed -separate-debug-info. 456 - [QTBUG-57086] Added support for Visual Studio 2017. 457 458qdbusxml2cpp 459------------ 460 461 - [QTBUG-34126] qdbusxml2cpp now supports the --verbose switch, which 462 provides more details when parsing invalid XML sources. 463 464qmake 465----- 466 467 - Added the $$take_first(), $$take_last(), $$num_add(), $$str_size(), 468 $$str_member(), and $$sorted() functions. 469 - The error() function can now be called without arguments to exit 470 silently. Use after write_file() and similar functions which already 471 print an error message. 472 - The $$system() function can return the command's exit code now. 473 - The $$prompt() function can now print the prompt verbatim. 474 - QMAKE_EXTRA_TARGETS will now consistently treat the target as a file 475 name (separator adjustment and quoting). 476 - [QTBUG-16904][VS] Fixed warning about circular dependencies when 477 Q_OBJECT is used in .cpp files. 478 - [QTBUG-36256] packageExists() and PKGCONFIG can now be used 479 regardless of whether Qt itself was built with pkg-config support. 480 - [QTBUG-43468][WinRT] Added option to use verbatim manifest files. 481 - [QTBUG-53905] Fixed OBJECTIVE_SOURCES being moc'd twice. 482 - [QTBUG-55591][VS2015] Added support for the /DEBUG:FASTLINK option. 483 - [QTBUG-56507] Fixed parallel builds when a lex source refers to a 484 file generated from a yacc source. 485 - [QTBUG-56594][MSVC] Fixed PDB files not being installed for static 486 libraries. 487 488moc 489--- 490 491 - [MSVC] qmake and moc now cooperate to use the Visual Studio environment 492 variables (set by the VCVARSALL.BAT script) to find system include 493 files. A possible consequence is that moc parses application headers 494 slightly differently, depending on #if conditions that depended on 495 macros that previous versions had not seen #define'd. Implementers of 496 other buildsystems are advised to pass the --compiler-flavor=msvc option 497 to moc. 498