summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_kernel_qabstractnativeeventfilter.h2
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_kernel_qabstractnativeeventfilter.mm2
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp4
-rw-r--r--src/corelib/global/global.pri23
-rw-r--r--src/corelib/global/qfeatures.txt956
-rw-r--r--src/corelib/global/qnamespace.h2
-rw-r--r--src/corelib/global/qnamespace.qdoc3
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp96
-rw-r--r--src/corelib/io/qloggingregistry.cpp22
-rw-r--r--src/corelib/io/qloggingregistry_p.h1
-rw-r--r--src/corelib/io/qprocess_win.cpp3
-rw-r--r--src/corelib/io/qurl.cpp6
-rw-r--r--src/corelib/kernel/qcoreevent.h2
-rw-r--r--src/corelib/kernel/qeventdispatcher_cf.mm5
-rw-r--r--src/corelib/kernel/qeventdispatcher_cf_p.h9
-rw-r--r--src/corelib/mimetypes/qmimeprovider.cpp5
-rw-r--r--src/corelib/plugin/qfactoryloader_p.h11
-rw-r--r--src/corelib/plugin/qlibrary.cpp1
-rw-r--r--src/corelib/plugin/qlibrary_p.h13
-rw-r--r--src/corelib/plugin/qpluginloader.cpp2
-rw-r--r--src/corelib/thread/qreadwritelock.cpp6
-rw-r--r--src/corelib/tools/qbytearray.h10
-rw-r--r--src/corelib/tools/qeasingcurve.h2
-rw-r--r--src/corelib/tools/qfreelist_p.h4
-rw-r--r--src/corelib/tools/qlocale.cpp1
-rw-r--r--src/corelib/tools/qrect.cpp6
-rw-r--r--src/corelib/tools/qtimezone.cpp14
-rw-r--r--src/corelib/tools/qtimezoneprivate_p.h2
-rw-r--r--src/corelib/tools/qvarlengtharray.h31
-rw-r--r--src/corelib/tools/qvarlengtharray.qdoc28
30 files changed, 202 insertions, 1070 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_kernel_qabstractnativeeventfilter.h b/src/corelib/doc/snippets/code/src_corelib_kernel_qabstractnativeeventfilter.h
index 9734f99d50..8818e23ffa 100644
--- a/src/corelib/doc/snippets/code/src_corelib_kernel_qabstractnativeeventfilter.h
+++ b/src/corelib/doc/snippets/code/src_corelib_kernel_qabstractnativeeventfilter.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2016 Samuel Gaist <samuel.gaist@edeltech.ch>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
diff --git a/src/corelib/doc/snippets/code/src_corelib_kernel_qabstractnativeeventfilter.mm b/src/corelib/doc/snippets/code/src_corelib_kernel_qabstractnativeeventfilter.mm
index 8abd576259..2c94178e13 100644
--- a/src/corelib/doc/snippets/code/src_corelib_kernel_qabstractnativeeventfilter.mm
+++ b/src/corelib/doc/snippets/code/src_corelib_kernel_qabstractnativeeventfilter.mm
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2016 Samuel Gaist <samuel.gaist@edeltech.ch>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp
index 1c7f9d4b54..4bdaa4d657 100644
--- a/src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp
@@ -55,6 +55,6 @@ QRect r2(QPoint(100, 200), QSize(11, 16));
//! [1]
-QRectF r1(100, 200, 11, 16);
-QRectF r2(QPoint(100, 200), QSize(11, 16));
+QRectF r1(100.0, 200.1, 11.2, 16.3);
+QRectF r2(QPointF(100.0, 200.1), QSizeF(11.2, 16.3));
//! [1]
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index 9ae1e3a4ae..f162dd95dd 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -80,13 +80,16 @@ gcc:ltcg {
SOURCES += $$VERSIONTAGGING_SOURCES
}
-QMAKE_QFLOAT16_TABLES_GENERATE = global/qfloat16.h
-
-qtPrepareTool(QMAKE_QFLOAT16_TABLES, qfloat16-tables)
-
-qfloat16_tables.commands = $$QMAKE_QFLOAT16_TABLES ${QMAKE_FILE_OUT}
-qfloat16_tables.output = global/qfloat16tables.cpp
-qfloat16_tables.depends = $$QMAKE_QFLOAT16_TABLES
-qfloat16_tables.input = QMAKE_QFLOAT16_TABLES_GENERATE
-qfloat16_tables.variable_out = SOURCES
-QMAKE_EXTRA_COMPILERS += qfloat16_tables
+# On AARCH64 the fp16 extension is mandatory, so we don't need the conversion tables.
+!contains(QT_ARCH, "arm64") {
+ QMAKE_QFLOAT16_TABLES_GENERATE = global/qfloat16.h
+
+ qtPrepareTool(QMAKE_QFLOAT16_TABLES, qfloat16-tables)
+
+ qfloat16_tables.commands = $$QMAKE_QFLOAT16_TABLES ${QMAKE_FILE_OUT}
+ qfloat16_tables.output = global/qfloat16tables.cpp
+ qfloat16_tables.depends = $$QMAKE_QFLOAT16_TABLES
+ qfloat16_tables.input = QMAKE_QFLOAT16_TABLES_GENERATE
+ qfloat16_tables.variable_out = SOURCES
+ QMAKE_EXTRA_COMPILERS += qfloat16_tables
+}
diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt
deleted file mode 100644
index 458f87ec16..0000000000
--- a/src/corelib/global/qfeatures.txt
+++ /dev/null
@@ -1,956 +0,0 @@
-# Generic entry format
-#Feature: UPPERCASENAME (for the #define)
-#Description: One sentence description of what this does.
-#Section: Categorization
-#Requires: UPPERCASENAME...
-#Name: CamelCaseName (often a class name)
-#SeeAlso: UPPERCASENAME... (currently unused)
-
-# Kernel
-
-Feature: PROPERTIES
-Description: Supports scripting Qt-based applications.
-Section: Kernel
-Requires:
-Name: Properties
-
-Feature: TEXTHTMLPARSER
-Description: Parser for HTML
-Section: Kernel
-Requires:
-Name: HtmlParser
-
-Feature: TEXTODFWRITER
-Description: Provides an ODF writer
-Section: Kernel
-Requires: XMLSTREAMWRITER
-Name: OdfWriter
-
-Feature: CSSPARSER
-Description: Parser for Style Sheets
-Section: Kernel
-Requires:
-Name: CssParser
-
-Feature: REGULAREXPRESSION
-Description: Perl-compatible regular expression APIs
-Section: Kernel
-Requires:
-Name: QRegularExpression
-
-Feature: CONCURRENT
-Description: Provides a high-level multi-threaded APIs
-Section: Kernel
-Requires:
-Name: QtConcurrent
-
-Feature: DRAGANDDROP
-Description: Supports the drag and drop mechansim.
-Section: Kernel
-Requires: IMAGEFORMAT_XPM
-Name: Drag and drop
-
-Feature: SESSIONMANAGER
-Description: Supports session management.
-Section: Kernel
-Requires:
-Name: Session Manager
-
-Feature: SHORTCUT
-Description: Supports keyboard accelerators and shortcuts.
-Section: Kernel
-Requires:
-Name: QShortcut
-
-Feature: ACTION
-Description: Supports widget actions.
-Section: Kernel
-Requires:
-Name: QAction
-
-Feature: CURSOR
-Description: Supports mouse cursors.
-Section: Kernel
-Requires:
-Name: QCursor
-
-Feature: CLIPBOARD
-Description: Supports cut and paste operations.
-Section: Kernel
-Requires:
-Name: QClipboard
-
-Feature: WHEELEVENT
-Description: Supports wheel events.
-Section: Kernel
-Requires:
-Name: QWheelEvent
-
-Feature: TABLETEVENT
-Description: Supports tablet events.
-Section: Kernel
-Requires:
-Name: QTabletEvent
-
-Feature: EFFECTS
-Description: Supports special widget effects (e.g. fading and scrolling).
-Section: Kernel
-Requires:
-Name: Effects
-
-Feature: SHAREDMEMORY
-Description: Provides access to a shared memory segment.
-Section: Kernel
-Requires:
-Name: QSharedMemory
-
-Feature: SYSTEMSEMAPHORE
-Description: Provides a general counting system semaphore.
-Section: Kernel
-Requires: SHAREDMEMORY
-Name: QSystemSemaphore
-
-Feature: XMLSTREAM
-Description: Provides a simple streaming API for XML.
-Section: Kernel
-Requires:
-Name: XML Streaming APIs
-
-Feature: XMLSTREAMREADER
-Description: Provides a well-formed XML parser with a simple streaming API.
-Section: Kernel
-Requires: XMLSTREAM
-Name: QXmlStreamReader
-
-Feature: XMLSTREAMWRITER
-Description: Provides a XML writer with a simple streaming API.
-Section: Kernel
-Requires: XMLSTREAM
-Name: QXmlStreamWriter
-
-Feature: IM
-Description: Inputmethods with QInputContext
-Section: Kernel
-Requires: LIBRARY
-Name: QInputContext
-
-# Data structures
-
-Feature: TEXTDATE
-Description: Supports month and day names in dates.
-Section: Data structures
-Requires:
-Name: Text Date
-
-Feature: DATESTRING
-Description: Supports convertion between dates and strings.
-Section: Data structures
-Requires: TEXTDATE
-Name: QDate/QTime/QDateTime
-
-# File I/O
-
-Feature: PROCESS
-Description: Supports external process invocation.
-Section: File I/O
-Requires:
-Name: QProcess
-
-Feature: TEMPORARYFILE
-Description: Provides an I/O device that operates on temporary files.
-Section: File I/O
-Requires:
-Name: QTemporaryFile
-
-Feature: LIBRARY
-Description: Supports a shared library wrapper.
-Section: File I/O
-Requires:
-Name: QLibrary
-
-Feature: SETTINGS
-Description: Supports persistent application settings.
-Section: File I/O
-Requires:
-Name: QSettings
-
-Feature: DOM
-Description: Supports the Document Object Model.
-Section: File I/O
-Requires:
-Name: Document Object Model
-
-Feature: FILESYSTEMMODEL
-Description: Provides a data model for the local filesystem.
-Section: File I/O
-Requires:
-Name: QFileSystemModel
-
-Feature: FILESYSTEMWATCHER
-Description: Provides an interface for monitoring files and directories for modications.
-Section: File I/O
-Requires:
-Name: QFileSystemWatcher
-
-Feature: FILESYSTEMITERATOR
-Description: Provides fast file-system iteration.
-Section: File I/O
-Requires:
-Name: QFileSystemIterator
-
-# Widgets
-
-Feature: TREEWIDGET
-Description: Supports views using tree models.
-Section: Widgets
-Requires: TREEVIEW
-Name: QTreeWidget
-
-Feature: LISTWIDGET
-Description: Supports item-based list widgets.
-Section: Widgets
-Requires: LISTVIEW
-Name: QListWidget
-
-Feature: TABLEWIDGET
-Description: Supports item-based table views.
-Section: Widgets
-Requires: TABLEVIEW
-Name: QTableWidget
-
-Feature: DATETIMEEDIT
-Description: Supports editing dates and times.
-Section: Widgets
-Requires: CALENDARWIDGET DATESTRING
-Name: QDateTimeEdit
-
-Feature: STACKEDWIDGET
-Description: Supports stacked widgets.
-Section: Widgets
-Requires:
-Name: QStackedWidget
-
-Feature: TEXTBROWSER
-Description: Supports HTML document browsing.
-Section: Widgets
-Requires: TEXTEDIT
-Name: QTextBrowser
-
-Feature: SPLASHSCREEN
-Description: Supports splash screens that can be shown during application startup.
-Section: Widgets
-Requires:
-Name: Splash screen widget
-
-Feature: SPLITTER
-Description: Supports user controlled splitter widgets.
-Section: Widgets
-Requires: RUBBERBAND
-Name: QSplitter
-
-Feature: LCDNUMBER
-Description: Supports LCD-like digits.
-Section: Widgets
-Requires:
-Name: QLCDNumber
-
-Feature: MENU
-Description: Supports popup-menus.
-Section: Widgets
-Requires: ACTION
-Name: QMenu
-
-Feature: LINEEDIT
-Description: Supports single-line edits.
-Section: Widgets
-Requires:
-Name: QLineEdit
-
-Feature: SPINBOX
-Description: Supports spin boxes handling integers and discrete sets of values.
-Section: Widgets
-Requires: SPINWIDGET LINEEDIT VALIDATOR
-Name: QSpinBox
-
-Feature: TABBAR
-Description: Supports tab bars, e.g. for use in tabbed dialogs.
-Section: Widgets
-Requires: TOOLBUTTON
-Name: QTabBar
-
-Feature: TABWIDGET
-Description: Supports stacking tabbed widgets.
-Section: Widgets
-Requires: TABBAR STACKEDWIDGET
-Name: QTabWidget
-
-Feature: COMBOBOX
-Description: Supports comboboxes presenting a list of options to the user.
-Section: Widgets
-Requires: LINEEDIT STANDARDITEMMODEL LISTVIEW
-Name: QComboBox
-
-Feature: FONTCOMBOBOX
-Description: Supports a combobox that lets the user select a font family.
-Section: Widgets
-Requires: COMBOBOX STRINGLISTMODEL
-Name: QFontComboBox
-
-Feature: TOOLBUTTON
-Description: Supports quick-access buttons to commands and options.
-Section: Widgets
-Requires: ACTION
-Name: QToolButton
-
-Feature: TOOLBAR
-Description: Supports movable panels containing a set of controls.
-Section: Widgets
-Requires: MAINWINDOW
-Name: QToolBar
-
-Feature: TOOLBOX
-Description: Supports columns of tabbed widget items.
-Section: Widgets
-Requires: TOOLBUTTON SCROLLAREA
-Name: QToolBox
-
-Feature: GROUPBOX
-Description: Supports group box frames.
-Section: Widgets
-Requires:
-Name: QGroupBox
-
-Feature: BUTTONGROUP
-Description: Supports organizing groups of button widgets.
-Section: Widgets
-Requires: GROUPBOX
-Name: QButtonGroup
-
-Feature: MAINWINDOW
-Description: Supports main application windows.
-Section: Widgets
-Requires: MENU RESIZEHANDLER TOOLBUTTON
-Name: QMainWindow
-
-Feature: DOCKWIDGET
-Description: Supports docking widgets inside a QMainWindow or floated as a top-level window on the desktop.
-Section: Widgets
-Requires: RUBBERBAND MAINWINDOW
-Name: QDockwidget
-
-Feature: MDIAREA
-Description: Provides an area in which MDI windows are displayed.
-Section: Widgets
-Requires: SCROLLAREA
-Name: QMdiArea
-
-Feature: RESIZEHANDLER
-Description: Supports an internal resize handler.
-Section: Widgets
-Requires:
-Name: Resize Handler
-
-Feature: STATUSBAR
-Description: Supports presentation of status information.
-Section: Widgets
-Requires:
-Name: QStatusBar
-
-Feature: MENUBAR
-Description: Supports pull-down menu items.
-Section: Widgets
-Requires: MENU TOOLBUTTON
-Name: QMenuBar
-
-Feature: CONTEXTMENU
-Description: Supports pop-up menus on right mouse click
-Section: Widgets
-Requires: MENU
-Name: Context menu
-
-Feature: PROGRESSBAR
-Description: Supports presentation of operation progress.
-Section: Widgets
-Requires:
-Name: QProgressBar
-
-Feature: SLIDER
-Description: Supports sliders controlling a bounded value.
-Section: Widgets
-Requires:
-Name: QSlider
-
-Feature: SCROLLBAR
-Description: Supports scrollbars allowing the user access parts of a document that is larger than the widget used to display it.
-Section: Widgets
-Requires: SLIDER
-Name: QScrollBar
-
-Feature: DIAL
-Description: Supports rounded range control, e.g. like a speedometer.
-Section: Widgets
-Requires: SLIDER
-Name: QDial
-
-Feature: SCROLLAREA
-Description: Supports scrolling views onto widgets.
-Section: Widgets
-Requires: SCROLLBAR
-Name: QScrollArea
-
-Feature: GRAPHICSVIEW
-Description: Supports the graphicsview classes.
-Section: Widgets
-Requires: SCROLLAREA
-Name: QGraphicsView
-
-Feature: GRAPHICSEFFECT
-Description: Supports the graphicseffect classes.
-Section: Widgets
-Requires: GRAPHICSVIEW
-Name: QGraphicsEffect
-
-Feature: SPINWIDGET
-Description: Supports spinbox control widgets.
-Section: Widgets
-Requires:
-Name: Spin Widget
-
-Feature: TEXTEDIT
-Description: Supports rich text editing.
-Section: Widgets
-Requires: SCROLLAREA PROPERTIES
-Name: QTextEdit
-
-Feature: SYNTAXHIGHLIGHTER
-Description: Supports custom syntax highlighting.
-Section: Widgets
-Requires: TEXTEDIT
-Name: QSyntaxHighlighter
-
-Feature: RUBBERBAND
-Description: Supports using rubberbands to indicate selections and boundaries.
-Section: Widgets
-Requires:
-Name: QRubberBand
-
-Feature: TOOLTIP
-Description: Supports presentation of tooltips.
-Section: Widgets
-Requires:
-Name: QToolTip
-
-Feature: STATUSTIP
-Description: Supports status tip functionality and events.
-Section: Widgets
-Requires:
-Name: Status Tip
-
-Feature: WHATSTHIS
-Description: Supports displaying "What's this" help.
-Section: Widgets
-Requires: TOOLBUTTON
-Name: QWhatsThis
-
-Feature: VALIDATOR
-Description: Supports validation of input text.
-Section: Widgets
-Requires:
-Name: QValidator
-
-Feature: SIZEGRIP
-Description: Supports corner-grips for resizing a top-level windows.
-Section: Widgets
-Requires:
-Name: QSizeGrip
-
-Feature: CALENDARWIDGET
-Description: Provides a monthly based calendar widget allowing the user to select a date.
-Section: Widgets
-Requires: TABLEVIEW MENU TEXTDATE SPINBOX TOOLBUTTON
-Name: QCalendarWidget
-
-Feature: PRINTPREVIEWWIDGET
-Description: Provides a widget for previewing page layouts for printer output.
-Section: Widgets
-Requires: GRAPHICSVIEW PRINTER MAINWINDOW
-Name: QPrintPreviewWidget
-
-Feature: KEYSEQUENCEEDIT
-Description: Provides a widget for editing QKeySequences
-Section: Widgets
-Requires: LINEEDIT SHORTCUT
-Name: QKeySequenceEdit
-
-# Dialogs
-
-Feature: MESSAGEBOX
-Description: Supports message boxes displaying
-informative messages and simple questions.
-Section: Dialogs
-Requires:
-Name: QMessageBox
-
-Feature: COLORDIALOG
-Description: Supports a dialog widget for specifying colors.
-Section: Dialogs
-Requires: SPINBOX
-Name: QColorDialog
-
-Feature: FILEDIALOG
-Description: Supports a dialog widget for selecting files or directories.
-Section: Dialogs
-Requires: FILESYSTEMMODEL TREEVIEW COMBOBOX TOOLBUTTON BUTTONGROUP TOOLTIP SPLITTER STACKEDWIDGET PROXYMODEL
-Name: QFileDialog
-
-Feature: FONTDIALOG
-Description: Supports a dialog widget for selecting fonts.
-Section: Dialogs
-Requires: STRINGLISTMODEL COMBOBOX VALIDATOR GROUPBOX
-Name: QFontDialog
-
-Feature: PRINTDIALOG
-Description: Supports a dialog widget for specifying printer configuration.
-Section: Dialogs
-Requires: PRINTER COMBOBOX BUTTONGROUP SPINBOX TABWIDGET
-Name: QPrintDialog
-
-Feature: PRINTPREVIEWDIALOG
-Description: Provides a dialog for previewing and configuring page layouts for printer output.
-Section: Dialogs
-Requires: PRINTPREVIEWWIDGET PRINTDIALOG TOOLBAR
-Name: QPrintPreviewDialog
-
-Feature: PROGRESSDIALOG
-Description: Supports feedback on the progress of a slow operation.
-Section: Dialogs
-Requires: PROGRESSBAR
-Name: QProgressDialog
-
-Feature: INPUTDIALOG
-Description: Supports a simple convenience dialog to get a single value from the user.
-Section: Dialogs
-Requires: COMBOBOX SPINBOX STACKEDWIDGET
-Name: QInputDialog
-
-Feature: ERRORMESSAGE
-Description: Supports an error message display dialog.
-Section: Dialogs
-Requires: TEXTEDIT
-Name: QErrorMessage
-
-Feature: WIZARD
-Description: Provides a framework for wizards.
-Section: Dialogs
-Requires: PROPERTIES
-Name: QWizard
-
-# ItemViews
-
-Feature: ITEMVIEWS
-Description: Supports the model/view architecture managing the relationship between data and the way it is presented to the user.
-Section: ItemViews
-Requires: RUBBERBAND SCROLLAREA
-Name: The Model/View Framework
-
-Feature: DIRMODEL
-Description: Supports a data model for the local filesystem.
-Section: ItemViews
-Requires: ITEMVIEWS FILESYSTEMMODEL
-Name: QDirModel
-
-Feature: STANDARDITEMMODEL
-Description: Supports a generic model for storing custom data.
-Section: ItemViews
-Requires: ITEMVIEWS
-Name: QStandardItemModel
-
-Feature: PROXYMODEL
-Description: Supports processing of data passed between another model and a view.
-Section: ItemViews
-Requires: ITEMVIEWS
-Name: QAbstractProxyModel
-
-Feature: SORTFILTERPROXYMODEL
-Description: Supports sorting and filtering of data passed between another model and a view.
-Section: ItemViews
-Requires: PROXYMODEL
-Name: QSortFilterProxyModel
-
-Feature: IDENTITYPROXYMODEL
-Description: Supports proxying a source model unmodified.
-Section: ItemViews
-Requires: PROXYMODEL
-Name: QIdentityProxyModel
-
-Feature: STRINGLISTMODEL
-Description: Supports a model that supplies strings to views.
-Section: ItemViews
-Requires: ITEMVIEWS
-Name: QStringListModel
-
-Feature: LISTVIEW
-Description: Supports a list or icon view onto a model.
-Section: ItemViews
-Requires: ITEMVIEWS
-Name: QListView
-
-Feature: TABLEVIEW
-Description: Supports a default model/view implementation of a table view.
-Section: ItemViews
-Requires: ITEMVIEWS
-Name: QTableView
-
-Feature: TREEVIEW
-Description: Supports a default model/view implementation of a tree view.
-Section: ItemViews
-Requires: ITEMVIEWS
-Name: QTreeView
-
-Feature: DATAWIDGETMAPPER
-Description: Provides mapping between a section of a data model to widgets.
-Section: ItemViews
-Requires: ITEMVIEWS PROPERTIES
-Name: QDataWidgetMapper
-
-Feature: COLUMNVIEW
-Description: Provides a model/view implementation of a column view.
-Section: ItemViews
-Requires: LISTVIEW
-Name: QColumnView
-
-# Styles
-
-Feature: STYLE_WINDOWS
-Description: Supports a Microsoft Windows-like look and feel.
-Section: Styles
-Requires:
-Name: QWindowsStyle
-
-Feature: STYLE_FUSION
-Description: Supports a modern platform independent widget style.
-Section: Styles
-Requires: IMAGEFORMAT_XPM
-Name: QFusionStyle
-
-Feature: STYLE_WINDOWSXP
-Description: Supports a Microsoft WindowsXP-like look and feel.
-Section: Styles
-Requires: STYLE_WINDOWS
-Name: QWindowsXPStyle
-
-Feature: STYLE_WINDOWSVISTA
-Description: Supports a Microsoft WindowsVista-like look and feel.
-Section: Styles
-Requires: STYLE_WINDOWSXP
-Name: QWindowsVistaStyle
-
-Feature: STYLE_WINDOWSCE
-Description: WindowsCE look and feel
-Section: Styles
-Requires: STYLE_WINDOWS IMAGEFORMAT_XPM
-Name: QWindowsCEStyle
-
-Feature: STYLE_WINDOWSMOBILE
-Description: WindowsMobile look and feel
-Section: Styles
-Requires: STYLE_WINDOWS IMAGEFORMAT_XPM
-Name: QWindowsMobileStyle
-
-Feature: STYLE_STYLESHEET
-Description:
-Section: Styles
-Requires: STYLE_WINDOWS PROPERTIES CSSPARSER
-Name: QStyleSheetStyle
-
-# Images
-
-Feature: IMAGEFORMATPLUGIN
-Description: Supports writing an image format plugin.
-Section: Images
-Requires: LIBRARY
-Name: QImageIOPlugin
-
-Feature: MOVIE
-Description: Supports animated images.
-Section: Images
-Requires:
-Name: QMovie
-
-Feature: IMAGEFORMAT_BMP
-Description: Supports Microsoft's Bitmap image file format.
-Section: Images
-Requires:
-Name: BMP Image Format
-
-Feature: IMAGEFORMAT_PPM
-Description: Supports the Portable Pixmap image file format.
-Section: Images
-Requires:
-Name: PPM Image Format
-
-Feature: IMAGEFORMAT_XBM
-Description: Supports the X11 Bitmap image file format.
-Section: Images
-Requires:
-Name: XBM Image Format
-
-Feature: IMAGEFORMAT_XPM
-Description: Supports the X11 Pixmap image file format.
-Section: Images
-Requires:
-Name: XPM Image Format
-
-Feature: IMAGEFORMAT_PNG
-Description: Supports the Portable Network Graphics image file format.
-Section: Images
-Requires:
-Name: PNG Image Format
-
-Feature: IMAGEFORMAT_JPEG
-Description: Supports the Joint Photographic Experts Group image file format.
-Section: Images
-Requires:
-Name: JPEG Image Format
-
-Feature: IMAGE_HEURISTIC_MASK
-Description: Supports creating a 1-bpp heuristic mask for images.
-Section: Images
-Requires:
-Name: QImage::createHeuristicMask()
-
-Feature: IMAGE_TEXT
-Description: Supports image file text strings.
-Section: Images
-Requires:
-Name: Image Text
-
-# Painting
-
-Feature: PICTURE
-Description: Supports recording and replaying QPainter commands.
-Section: Painting
-Requires:
-Name: QPicture
-
-Feature: COLORNAMES
-Description: Supports color names such as "red", used by QColor and by some HTML documents.
-Section: Painting
-Requires:
-Name: Color Names
-
-Feature: PDF
-Description: Supports pdf format
-Section: Painting
-Requires: TEMPORARYFILE
-Name: QPdf
-
-Feature: PRINTER
-Description: Supports printing
-Section: Painting
-Requires: PICTURE TEMPORARYFILE PDF
-Name: QPrinter
-
-Feature: CUPS
-Description Supports the Common UNIX Printing System
-Section: Painting
-Requires: PRINTER LIBRARY
-Name: Common UNIX Printing System
-
-Feature: PAINT_DEBUG
-Description: Debug painting with the environment variables QT_FLUSH_UPDATE and QT_FLUSH_PAINT
-Section: Painting
-Requires:
-Name: Painting Debug Utilities
-
-# Fonts
-
-Feature: FREETYPE
-Description: Supports the FreeType 2 font engine (and its supported font formats).
-Section: Fonts
-Requires:
-Name: Freetype Font Engine
-
-# Internationalization
-
-Feature: TRANSLATION
-Description: Supports translations using QObject::tr().
-Section: Internationalization
-Requires:
-Name: Translation
-
-Feature: TEXTCODEC
-Description: Supports conversions between text encodings.
-Section: Internationalization
-Requires:
-Name: QTextCodec
-
-Feature: CODECS
-Description: Supports non-unicode text conversions.
-Section: Internationalization
-Requires: TEXTCODEC
-Name: Codecs
-
-Feature: BIG_CODECS
-Description: Supports big codecs, e.g. CJK.
-Section: Internationalization
-Requires: TEXTCODEC
-Name: Big Codecs
-
-Feature: ICONV
-Description: Supports conversions between text encodings using iconv.
-Section: Internationalization
-Requires: TEXTCODEC
-Name: iconv
-
-# Networking
-
-Feature: FTP
-Description: Supports FTP file access.
-Section: Networking
-Requires: TEXTDATE
-Name: File Transfer Protocol
-
-Feature: HTTP
-Description: Supports HTTP file access.
-Section: Networking
-Requires:
-Name: Hyper Text Transfer Protocol
-
-Feature: UDPSOCKET
-Description: Supports User Datagram Protocol sockets.
-Section: Networking
-Requires:
-Name: QUdpSocket
-
-Feature: NETWORKPROXY
-Description: Supports configuring network layer proxy support to the Qt network classes.
-Section: Networking
-Requires:
-Name: QNetworkProxy
-
-Feature: SOCKS5
-Description: Supports SOCKS v5 network proxy.
-Section: Networking
-Requires: NETWORKPROXY
-Name: SOCKS5
-
-Feature: NETWORKINTERFACE
-Description: Supports listing the host's IP addresses and network interfaces
-Section: Networking
-Requires:
-Name: QNetworkInterface
-
-Feature: NETWORKDISKCACHE
-Description: Supports a disk cache for network resources
-Section: Networking
-Requires: TEMPORARYFILE
-Name: QNetworkDiskCache
-
-Feature: BEARERMANAGEMENT
-Description: Provides bearer management support
-Section: Networking
-Requires: LIBRARY NETWORKINTERFACE PROPERTIES
-Name: Bearer Management
-
-Feature: LOCALSERVER
-Description: Supports a local socket based server
-Section: Networking
-Requires: TEMPORARYFILE
-Name: QLocalServer
-
-# Utilities
-
-Feature: COMPLETER
-Description: Provides completions based on an item model.
-Section: Utilities
-Requires: PROXYMODEL
-Name: QCompleter
-
-Feature: FSCOMPLETER
-Description: Provides completions based on an item model.
-Section: Utilities
-Requires: FILESYSTEMMODEL COMPLETER
-Name: QCompleter
-
-Feature: DESKTOPSERVICES
-Description: Provides methods for accessing common desktop services.
-Section: Utilities
-Requires:
-Name: QDesktopServices
-
-Feature: MIMETYPE
-Description: Describes types of file or data, represented by a MIME type string.
-Section: Utilities
-Requires:
-Name: QMimeType
-
-Feature: SYSTEMTRAYICON
-Description: Provides an icon for an application in the system tray.
-Section: Utilities
-Requires:
-Name: QSystemTrayIcon
-
-Feature: UNDOCOMMAND
-Description: Applies (redo or) undo of a single change in a document.
-Section: Utilities
-Requires:
-Name: QUndoCommand
-
-Feature: UNDOSTACK
-Description: Provides the ability to (redo or) undo a list of changes in a document.
-Section: Utilities
-Requires: UNDOCOMMAND
-Name: QUndoStack
-
-Feature: UNDOGROUP
-Description:
-Section: Utilities
-Requires: UNDOSTACK
-Name: QUndoGroup
-
-Feature: UNDOVIEW
-Description: A widget which shows the contents of an undo stack.
-Section: Utilities
-Requires: UNDOSTACK LISTVIEW
-Name: QUndoView
-
-Feature: ACCESSIBILITY
-Description: Provides accessibility support.
-Section: Utilities
-Requires: PROPERTIES MENUBAR
-Name: Accessibility
-
-Feature: ANIMATION
-Description: Provides a framework for animations.
-Section: Utilities
-Requires: PROPERTIES
-Name: Animation
-
-Feature: STATEMACHINE
-Description: Provides hierarchical finite state machines.
-Section: Utilities
-Requires: PROPERTIES
-Name: State machine
-
-Feature: GESTURES
-Description: Provides a framework for gestures.
-Section: Utilities
-Requires:
-Name: Gesture
-
-# D-Bus
-
-Feature: DBUS
-Description: Provides classes for D-Bus.
-Section: D-Bus
-Requires: PROPERTIES XMLSTREAMREADER
-Name: Qt D-Bus module
-
-# XML Patterns
-
-Feature: XMLSCHEMA
-Description: Provides XML schema validation.
-Section: Xml Patterns
-Requires:
-Name: XML Schema APIs
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index c3833c6bd1..da44c01594 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -472,6 +472,8 @@ public:
WA_AlwaysStackOnTop = 128,
+ WA_TabletTracking = 129,
+
// Add new attributes before this line
WA_AttributeCount
};
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 8da06f71f7..b8588b3f98 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1139,6 +1139,9 @@
\value WA_StyleSheet Indicates that the widget is styled using a
\l{Qt Style Sheets}{style sheet}.
+ \value WA_TabletTracking Indicates that the widget has tablet
+ tracking enabled. See QWidget::tabletTracking.
+
\value WA_TranslucentBackground Indicates that the widget should have a
translucent background, i.e., any non-opaque regions of the widgets will be
translucent because the widget will have an alpha channel. Setting this
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 31353523ad..b8dca93f61 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -557,45 +557,75 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
return data.hasFlags(what);
}
+// Note: if \a shouldMkdirFirst is false, we assume the caller did try to mkdir
+// before calling this function.
+static bool createDirectoryWithParents(const QByteArray &nativeName, bool shouldMkdirFirst = true)
+{
+ // helper function to check if a given path is a directory, since mkdir can
+ // fail if the dir already exists (it may have been created by another
+ // thread or another process)
+ const auto isDir = [](const QByteArray &nativeName) {
+ QT_STATBUF st;
+ return QT_STAT(nativeName.constData(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR;
+ };
+
+ if (shouldMkdirFirst && QT_MKDIR(nativeName, 0777) == 0)
+ return true;
+ if (errno == EEXIST)
+ return isDir(nativeName);
+ if (errno != ENOENT)
+ return false;
+
+ // mkdir failed because the parent dir doesn't exist, so try to create it
+ int slash = nativeName.lastIndexOf('/');
+ if (slash < 1)
+ return false;
+
+ QByteArray parentNativeName = nativeName.left(slash);
+ if (!createDirectoryWithParents(parentNativeName))
+ return false;
+
+ // try again
+ if (QT_MKDIR(nativeName, 0777) == 0)
+ return true;
+ return errno == EEXIST && isDir(nativeName);
+}
+
//static
bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool createParents)
{
QString dirName = entry.filePath();
- if (createParents) {
- dirName = QDir::cleanPath(dirName);
- for (int oldslash = -1, slash=0; slash != -1; oldslash = slash) {
- slash = dirName.indexOf(QDir::separator(), oldslash+1);
- if (slash == -1) {
- if (oldslash == dirName.length())
- break;
- slash = dirName.length();
- }
- if (slash) {
- const QByteArray chunk = QFile::encodeName(dirName.left(slash));
- if (QT_MKDIR(chunk.constData(), 0777) != 0) {
- if (errno == EEXIST
-#if defined(Q_OS_QNX)
- // On QNX the QNet (VFS paths of other hosts mounted under a directory
- // such as /net) mountpoint returns ENOENT, despite existing. stat()
- // on the QNet mountpoint returns successfully and reports S_IFDIR.
- || errno == ENOENT
-#endif
- ) {
- QT_STATBUF st;
- if (QT_STAT(chunk.constData(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR)
- continue;
- }
- return false;
- }
- }
- }
+
+ // Darwin doesn't support trailing /'s, so remove for everyone
+ while (dirName.size() > 1 && dirName.endsWith(QLatin1Char('/')))
+ dirName.chop(1);
+
+ // try to mkdir this directory
+ QByteArray nativeName = QFile::encodeName(dirName);
+ if (QT_MKDIR(nativeName, 0777) == 0)
return true;
+ if (!createParents)
+ return false;
+
+ // we need the cleaned path in order to create the parents
+ // and we save errno just in case encodeName needs to load codecs
+ int savedErrno = errno;
+ bool pathChanged;
+ {
+ QString cleanName = QDir::cleanPath(dirName);
+
+ // Check if the cleaned name is the same or not. If we were given a
+ // path with resolvable "../" sections, cleanPath will remove them, but
+ // this may change the target dir if one of those segments was a
+ // symlink. This operation depends on cleanPath's optimization of
+ // returning the original string if it didn't modify anything.
+ pathChanged = !dirName.isSharedWith(cleanName);
+ if (pathChanged)
+ nativeName = QFile::encodeName(cleanName);
}
-#if defined(Q_OS_DARWIN) // Mac X doesn't support trailing /'s
- if (dirName.endsWith(QLatin1Char('/')))
- dirName.chop(1);
-#endif
- return (QT_MKDIR(QFile::encodeName(dirName).constData(), 0777) == 0);
+
+ errno = savedErrno;
+ return createDirectoryWithParents(nativeName, pathChanged);
}
//static
diff --git a/src/corelib/io/qloggingregistry.cpp b/src/corelib/io/qloggingregistry.cpp
index b8d1919ee6..4f7bc95330 100644
--- a/src/corelib/io/qloggingregistry.cpp
+++ b/src/corelib/io/qloggingregistry.cpp
@@ -276,10 +276,11 @@ static QVector<QLoggingRule> loadRulesFromFile(const QString &filePath)
*/
void QLoggingRegistry::init()
{
+ QVector<QLoggingRule> er, qr, cr;
// get rules from environment
const QByteArray rulesFilePath = qgetenv("QT_LOGGING_CONF");
if (!rulesFilePath.isEmpty())
- envRules = loadRulesFromFile(QFile::decodeName(rulesFilePath));
+ er = loadRulesFromFile(QFile::decodeName(rulesFilePath));
const QByteArray rulesSrc = qgetenv("QT_LOGGING_RULES").replace(';', '\n');
if (!rulesSrc.isEmpty()) {
@@ -287,7 +288,7 @@ void QLoggingRegistry::init()
QLoggingSettingsParser parser;
parser.setSection(QStringLiteral("Rules"));
parser.setContent(stream);
- envRules += parser.rules();
+ er += parser.rules();
}
const QString configFileName = QStringLiteral("qtlogging.ini");
@@ -296,17 +297,22 @@ void QLoggingRegistry::init()
// get rules from Qt data configuration path
const QString qtConfigPath
= QDir(QLibraryInfo::location(QLibraryInfo::DataPath)).absoluteFilePath(configFileName);
- qtConfigRules = loadRulesFromFile(qtConfigPath);
+ qr = loadRulesFromFile(qtConfigPath);
#endif
// get rules from user's/system configuration
const QString envPath = QStandardPaths::locate(QStandardPaths::GenericConfigLocation,
QString::fromLatin1("QtProject/") + configFileName);
if (!envPath.isEmpty())
- configRules = loadRulesFromFile(envPath);
+ cr = loadRulesFromFile(envPath);
+
+ const QMutexLocker locker(&registryMutex);
+
+ envRules = std::move(er);
+ qtConfigRules = std::move(qr);
+ configRules = std::move(cr);
if (!envRules.isEmpty() || !qtConfigRules.isEmpty() || !configRules.isEmpty()) {
- QMutexLocker locker(&registryMutex);
updateRules();
}
}
@@ -347,11 +353,11 @@ void QLoggingRegistry::setApiRules(const QString &content)
parser.setSection(QStringLiteral("Rules"));
parser.setContent(content);
- QMutexLocker locker(&registryMutex);
-
if (qtLoggingDebug())
debugMsg("Loading logging rules set by QLoggingCategory::setFilterRules ...");
+ const QMutexLocker locker(&registryMutex);
+
apiRules = parser.rules();
updateRules();
@@ -405,6 +411,8 @@ QLoggingRegistry *QLoggingRegistry::instance()
/*!
\internal
Updates category settings according to rules.
+
+ As a category filter, it is run with registryMutex held.
*/
void QLoggingRegistry::defaultCategoryFilter(QLoggingCategory *cat)
{
diff --git a/src/corelib/io/qloggingregistry_p.h b/src/corelib/io/qloggingregistry_p.h
index 5197da1ba4..23740c4955 100644
--- a/src/corelib/io/qloggingregistry_p.h
+++ b/src/corelib/io/qloggingregistry_p.h
@@ -129,6 +129,7 @@ private:
QMutex registryMutex;
+ // protected by mutex:
QVector<QLoggingRule> qtConfigRules;
QVector<QLoggingRule> configRules;
QVector<QLoggingRule> envRules;
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index fcdf13fddb..aa69e9e1db 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -844,7 +844,8 @@ static bool startDetachedUacPrompt(const QString &programIn, const QStringList &
SHELLEXECUTEINFOW shellExecuteExInfo;
memset(&shellExecuteExInfo, 0, sizeof(SHELLEXECUTEINFOW));
shellExecuteExInfo.cbSize = sizeof(SHELLEXECUTEINFOW);
- shellExecuteExInfo.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_UNICODE | SEE_MASK_FLAG_NO_UI;
+ shellExecuteExInfo.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_UNICODE | SEE_MASK_FLAG_NO_UI | SEE_MASK_CLASSNAME;
+ shellExecuteExInfo.lpClass = L"exefile";
shellExecuteExInfo.lpVerb = L"runas";
const QString program = QDir::toNativeSeparators(programIn);
shellExecuteExInfo.lpFile = reinterpret_cast<LPCWSTR>(program.utf16());
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index a6372b75f6..18ad59f1cb 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -4169,10 +4169,10 @@ QUrl QUrl::fromUserInput(const QString &userInput, const QString &workingDirecto
return url;
}
- QUrl url = QUrl(trimmedString, QUrl::TolerantMode);
+ QUrl url = QUrl(userInput, QUrl::TolerantMode);
// Check both QUrl::isRelative (to detect full URLs) and QDir::isAbsolutePath (since on Windows drive letters can be interpreted as schemes)
- if (url.isRelative() && !QDir::isAbsolutePath(trimmedString)) {
- QFileInfo fileInfo(QDir(workingDirectory), trimmedString);
+ if (url.isRelative() && !QDir::isAbsolutePath(userInput)) {
+ QFileInfo fileInfo(QDir(workingDirectory), userInput);
if ((options & AssumeLocalFile) || fileInfo.exists())
return QUrl::fromLocalFile(fileInfo.absoluteFilePath());
}
diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h
index 7e962f816e..ac974ba411 100644
--- a/src/corelib/kernel/qcoreevent.h
+++ b/src/corelib/kernel/qcoreevent.h
@@ -284,6 +284,8 @@ public:
Pointer = 218, // QQuickPointerEvent; ### Qt 6: QPointerEvent
+ TabletTrackingChange = 219, // tablet tracking state has changed
+
// 512 reserved for Qt Jambi's MetaCall event
// 513 reserved for Qt Jambi's DeleteOnMainThread event
diff --git a/src/corelib/kernel/qeventdispatcher_cf.mm b/src/corelib/kernel/qeventdispatcher_cf.mm
index 27eb3d0337..608dea5426 100644
--- a/src/corelib/kernel/qeventdispatcher_cf.mm
+++ b/src/corelib/kernel/qeventdispatcher_cf.mm
@@ -44,7 +44,6 @@
#include <QtCore/qthread.h>
#include <QtCore/private/qcoreapplication_p.h>
#include <QtCore/private/qcore_unix_p.h>
-#include <QtCore/private/qcore_mac_p.h>
#include <QtCore/private/qthread_p.h>
#include <limits>
@@ -59,11 +58,13 @@
QT_USE_NAMESPACE
-@interface RunLoopModeTracker : NSObject {
+@interface QT_MANGLE_NAMESPACE(RunLoopModeTracker) : NSObject {
QStack<CFStringRef> m_runLoopModes;
}
@end
+QT_NAMESPACE_ALIAS_OBJC_CLASS(RunLoopModeTracker);
+
@implementation RunLoopModeTracker
- (id) init
diff --git a/src/corelib/kernel/qeventdispatcher_cf_p.h b/src/corelib/kernel/qeventdispatcher_cf_p.h
index e6581e2bac..8a234ebc40 100644
--- a/src/corelib/kernel/qeventdispatcher_cf_p.h
+++ b/src/corelib/kernel/qeventdispatcher_cf_p.h
@@ -90,14 +90,11 @@
#include <QtCore/qabstracteventdispatcher.h>
#include <QtCore/private/qtimerinfo_unix_p.h>
#include <QtCore/private/qcfsocketnotifier_p.h>
+#include <QtCore/private/qcore_mac_p.h>
#include <QtCore/qdebug.h>
#include <CoreFoundation/CoreFoundation.h>
-#ifdef __OBJC__
-@class RunLoopModeTracker;
-#else
-typedef struct objc_object RunLoopModeTracker;
-#endif
+Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(RunLoopModeTracker));
QT_BEGIN_NAMESPACE
@@ -253,7 +250,7 @@ private:
RunLoopSource<> m_postedEventsRunLoopSource;
RunLoopObserver<> m_runLoopActivityObserver;
- RunLoopModeTracker *m_runLoopModeTracker;
+ QT_MANGLE_NAMESPACE(RunLoopModeTracker) *m_runLoopModeTracker;
QTimerInfoList m_timerInfoList;
CFRunLoopTimerRef m_runLoopTimer;
diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp
index 959421bf52..5c0acce4c3 100644
--- a/src/corelib/mimetypes/qmimeprovider.cpp
+++ b/src/corelib/mimetypes/qmimeprovider.cpp
@@ -296,12 +296,15 @@ QMimeGlobMatchResult QMimeBinaryProvider::findByFileName(const QString &fileName
const QString lowerFileName = fileName.toLower();
// TODO this parses in the order (local, global). Check that it handles "NOGLOBS" correctly.
for (CacheFile *cacheFile : qAsConst(m_cacheFiles)) {
+ // Check literals (e.g. "Makefile")
matchGlobList(result, cacheFile, cacheFile->getUint32(PosLiteralListOffset), fileName);
+ // Check complex globs (e.g. "callgrind.out[0-9]*")
matchGlobList(result, cacheFile, cacheFile->getUint32(PosGlobListOffset), fileName);
+ // Check the very common *.txt cases with the suffix tree
const int reverseSuffixTreeOffset = cacheFile->getUint32(PosReverseSuffixTreeOffset);
const int numRoots = cacheFile->getUint32(reverseSuffixTreeOffset);
const int firstRootOffset = cacheFile->getUint32(reverseSuffixTreeOffset + 4);
- matchSuffixTree(result, cacheFile, numRoots, firstRootOffset, lowerFileName, fileName.length() - 1, false);
+ matchSuffixTree(result, cacheFile, numRoots, firstRootOffset, lowerFileName, lowerFileName.length() - 1, false);
if (result.m_matchingMimeTypes.isEmpty())
matchSuffixTree(result, cacheFile, numRoots, firstRootOffset, fileName, fileName.length() - 1, true);
}
diff --git a/src/corelib/plugin/qfactoryloader_p.h b/src/corelib/plugin/qfactoryloader_p.h
index 0876d141c4..70a934c976 100644
--- a/src/corelib/plugin/qfactoryloader_p.h
+++ b/src/corelib/plugin/qfactoryloader_p.h
@@ -57,11 +57,22 @@
#include "QtCore/qobject.h"
#include "QtCore/qstringlist.h"
#include "QtCore/qjsonobject.h"
+#include "QtCore/qjsondocument.h"
#include "QtCore/qmap.h"
+#include "QtCore/qendian.h"
#include "private/qlibrary_p.h"
QT_BEGIN_NAMESPACE
+inline QJsonDocument qJsonFromRawLibraryMetaData(const char *raw)
+{
+ raw += strlen("QTMETADATA ");
+ // the size of the embedded JSON object can be found 8 bytes into the data (see qjson_p.h),
+ // but doesn't include the size of the header (8 bytes)
+ QByteArray json(raw, qFromLittleEndian<uint>(*(const uint *)(raw + 8)) + 8);
+ return QJsonDocument::fromBinaryData(json);
+}
+
class QFactoryLoaderPrivate;
class Q_CORE_EXPORT QFactoryLoader : public QObject
{
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 96cf5371f9..a4a654cd88 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -42,6 +42,7 @@
#ifndef QT_NO_LIBRARY
+#include "qfactoryloader_p.h"
#include "qlibrary_p.h"
#include <qstringlist.h>
#include <qfile.h>
diff --git a/src/corelib/plugin/qlibrary_p.h b/src/corelib/plugin/qlibrary_p.h
index f883e74843..7147ff6ca2 100644
--- a/src/corelib/plugin/qlibrary_p.h
+++ b/src/corelib/plugin/qlibrary_p.h
@@ -58,25 +58,12 @@
#include "QtCore/qstringlist.h"
#include "QtCore/qplugin.h"
#include "QtCore/qsharedpointer.h"
-#include "QtCore/qjsonobject.h"
-#include "QtCore/qjsondocument.h"
-#include "QtCore/qendian.h"
#ifdef Q_OS_WIN
# include "QtCore/qt_windows.h"
#endif
QT_BEGIN_NAMESPACE
-// Needed also in case of QT_NO_LIBRARY, for static plugin loading.
-inline QJsonDocument qJsonFromRawLibraryMetaData(const char *raw)
-{
- raw += strlen("QTMETADATA ");
- // the size of the embedded JSON object can be found 8 bytes into the data (see qjson_p.h),
- // but doesn't include the size of the header (8 bytes)
- QByteArray json(raw, qFromLittleEndian<uint>(*(const uint *)(raw + 8)) + 8);
- return QJsonDocument::fromBinaryData(json);
-}
-
#ifndef QT_NO_LIBRARY
diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp
index 4ec4e43952..6723877ad5 100644
--- a/src/corelib/plugin/qpluginloader.cpp
+++ b/src/corelib/plugin/qpluginloader.cpp
@@ -43,7 +43,7 @@
#include "qcoreapplication.h"
#include "qpluginloader.h"
#include <qfileinfo.h>
-#include "qlibrary_p.h"
+#include "qfactoryloader_p.h"
#include "qdebug.h"
#include "qdir.h"
diff --git a/src/corelib/thread/qreadwritelock.cpp b/src/corelib/thread/qreadwritelock.cpp
index 6302a3a515..42befc4b80 100644
--- a/src/corelib/thread/qreadwritelock.cpp
+++ b/src/corelib/thread/qreadwritelock.cpp
@@ -392,13 +392,13 @@ bool QReadWriteLock::tryLockForWrite(int timeout)
*/
void QReadWriteLock::unlock()
{
- QReadWriteLockPrivate *d = d_ptr.load();
+ QReadWriteLockPrivate *d = d_ptr.loadAcquire();
while (true) {
Q_ASSERT_X(d, "QReadWriteLock::unlock()", "Cannot unlock an unlocked lock");
// Fast case: no contention: (no waiters, no other readers)
if (quintptr(d) <= 2) { // 1 or 2 (StateLockedForRead or StateLockedForWrite)
- if (!d_ptr.testAndSetRelease(d, nullptr, d))
+ if (!d_ptr.testAndSetOrdered(d, nullptr, d))
continue;
return;
}
@@ -407,7 +407,7 @@ void QReadWriteLock::unlock()
Q_ASSERT(quintptr(d) > (1U<<4)); //otherwise that would be the fast case
// Just decrease the reader's count.
auto val = reinterpret_cast<QReadWriteLockPrivate *>(quintptr(d) - (1U<<4));
- if (!d_ptr.testAndSetRelease(d, val, d))
+ if (!d_ptr.testAndSetOrdered(d, val, d))
continue;
return;
}
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index af85d27868..06a50e5990 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -140,8 +140,6 @@ struct QByteArrayDataPtr
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(size, sizeof(QByteArrayData)) \
/**/
-#if defined(Q_COMPILER_LAMBDA)
-
# define QByteArrayLiteral(str) \
([]() -> QByteArray { \
enum { Size = sizeof(str) - 1 }; \
@@ -154,14 +152,6 @@ struct QByteArrayDataPtr
}()) \
/**/
-#endif
-
-#ifndef QByteArrayLiteral
-// no lambdas, not GCC, just return a temporary QByteArray
-
-# define QByteArrayLiteral(str) QByteArray(str, sizeof(str) - 1)
-#endif
-
class Q_CORE_EXPORT QByteArray
{
private:
diff --git a/src/corelib/tools/qeasingcurve.h b/src/corelib/tools/qeasingcurve.h
index efed5d36ee..ba06de8f9e 100644
--- a/src/corelib/tools/qeasingcurve.h
+++ b/src/corelib/tools/qeasingcurve.h
@@ -125,7 +125,7 @@ private:
friend Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QEasingCurve &);
#endif
};
-Q_DECLARE_TYPEINFO(QEasingCurve, Q_MOVABLE_TYPE);
+Q_DECLARE_SHARED(QEasingCurve)
#ifndef QT_NO_DEBUG_STREAM
Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QEasingCurve &item);
diff --git a/src/corelib/tools/qfreelist_p.h b/src/corelib/tools/qfreelist_p.h
index c3efc41d62..a8d1132d06 100644
--- a/src/corelib/tools/qfreelist_p.h
+++ b/src/corelib/tools/qfreelist_p.h
@@ -237,7 +237,7 @@ inline int QFreeList<T, ConstantsType>::next()
int id, newid, at;
ElementType *v;
do {
- id = _next.load();
+ id = _next.loadAcquire();
at = id & ConstantsType::IndexMask;
const int block = blockfor(at);
@@ -254,7 +254,7 @@ inline int QFreeList<T, ConstantsType>::next()
}
newid = v[at].next.load() | (id & ~ConstantsType::IndexMask);
- } while (!_next.testAndSetRelaxed(id, newid));
+ } while (!_next.testAndSetRelease(id, newid));
// qDebug("QFreeList::next(): returning %d (_next now %d, serial %d)",
// id & ConstantsType::IndexMask,
// newid & ConstantsType::IndexMask,
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index cdda5292e7..ae4befcb9c 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -594,7 +594,6 @@ static QLocalePrivate *c_private()
*/
QSystemLocale::QSystemLocale()
{
- delete _systemLocale;
_systemLocale = this;
if (system_data)
diff --git a/src/corelib/tools/qrect.cpp b/src/corelib/tools/qrect.cpp
index 4b6183646b..895b6b9701 100644
--- a/src/corelib/tools/qrect.cpp
+++ b/src/corelib/tools/qrect.cpp
@@ -1323,8 +1323,8 @@ QDebug operator<<(QDebug dbg, const QRect &r)
rendering.
A QRectF can be constructed with a set of left, top, width and
- height integers, or from a QPoint and a QSize. The following code
- creates two identical rectangles.
+ height coordinates, or from a QPointF and a QSizeF. The following
+ code creates two identical rectangles.
\snippet code/src_corelib_tools_qrect.cpp 1
@@ -1344,7 +1344,7 @@ QDebug operator<<(QDebug dbg, const QRect &r)
translated copy of this rectangle.
The size() function returns the rectange's dimensions as a
- QSize. The dimensions can also be retrieved separately using the
+ QSizeF. The dimensions can also be retrieved separately using the
width() and height() functions. To manipulate the dimensions use
the setSize(), setWidth() or setHeight() functions. Alternatively,
the size can be changed by applying either of the functions
diff --git a/src/corelib/tools/qtimezone.cpp b/src/corelib/tools/qtimezone.cpp
index 359c2d0bdb..ec2f7c4af6 100644
--- a/src/corelib/tools/qtimezone.cpp
+++ b/src/corelib/tools/qtimezone.cpp
@@ -674,9 +674,9 @@ bool QTimeZone::isDaylightTime(const QDateTime &atDateTime) const
QTimeZone::OffsetData QTimeZone::offsetData(const QDateTime &forDateTime) const
{
if (hasTransitions())
- return d->toOffsetData(d->data(forDateTime.toMSecsSinceEpoch()));
+ return QTimeZonePrivate::toOffsetData(d->data(forDateTime.toMSecsSinceEpoch()));
else
- return d->invalidOffsetData();
+ return QTimeZonePrivate::invalidOffsetData();
}
/*!
@@ -712,9 +712,9 @@ bool QTimeZone::hasTransitions() const
QTimeZone::OffsetData QTimeZone::nextTransition(const QDateTime &afterDateTime) const
{
if (hasTransitions())
- return d->toOffsetData(d->nextTransition(afterDateTime.toMSecsSinceEpoch()));
+ return QTimeZonePrivate::toOffsetData(d->nextTransition(afterDateTime.toMSecsSinceEpoch()));
else
- return d->invalidOffsetData();
+ return QTimeZonePrivate::invalidOffsetData();
}
/*!
@@ -733,9 +733,9 @@ QTimeZone::OffsetData QTimeZone::nextTransition(const QDateTime &afterDateTime)
QTimeZone::OffsetData QTimeZone::previousTransition(const QDateTime &beforeDateTime) const
{
if (hasTransitions())
- return d->toOffsetData(d->previousTransition(beforeDateTime.toMSecsSinceEpoch()));
+ return QTimeZonePrivate::toOffsetData(d->previousTransition(beforeDateTime.toMSecsSinceEpoch()));
else
- return d->invalidOffsetData();
+ return QTimeZonePrivate::invalidOffsetData();
}
/*!
@@ -755,7 +755,7 @@ QTimeZone::OffsetDataList QTimeZone::transitions(const QDateTime &fromDateTime,
toDateTime.toMSecsSinceEpoch());
list.reserve(plist.count());
for (const QTimeZonePrivate::Data &pdata : plist)
- list.append(d->toOffsetData(pdata));
+ list.append(QTimeZonePrivate::toOffsetData(pdata));
}
return list;
}
diff --git a/src/corelib/tools/qtimezoneprivate_p.h b/src/corelib/tools/qtimezoneprivate_p.h
index 9985d0672c..0038908160 100644
--- a/src/corelib/tools/qtimezoneprivate_p.h
+++ b/src/corelib/tools/qtimezoneprivate_p.h
@@ -74,7 +74,7 @@ Q_FORWARD_DECLARE_OBJC_CLASS(NSTimeZone);
QT_BEGIN_NAMESPACE
-class Q_CORE_EXPORT QTimeZonePrivate : public QSharedData
+class Q_AUTOTEST_EXPORT QTimeZonePrivate : public QSharedData
{
public:
//Version of QTimeZone::OffsetData struct using msecs for efficiency
diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h
index 25f5176c22..5d0231417b 100644
--- a/src/corelib/tools/qvarlengtharray.h
+++ b/src/corelib/tools/qvarlengtharray.h
@@ -146,15 +146,35 @@ public:
T value(int i, const T &defaultValue) const;
inline void append(const T &t) {
- if (s == a) // i.e. s != 0
+ if (s == a) { // i.e. s != 0
+ T copy(t);
realloc(s, s<<1);
- const int idx = s++;
- if (QTypeInfo<T>::isComplex) {
- new (ptr + idx) T(t);
+ const int idx = s++;
+ if (QTypeInfo<T>::isComplex) {
+ new (ptr + idx) T(std::move(copy));
+ } else {
+ ptr[idx] = std::move(copy);
+ }
} else {
- ptr[idx] = t;
+ const int idx = s++;
+ if (QTypeInfo<T>::isComplex) {
+ new (ptr + idx) T(t);
+ } else {
+ ptr[idx] = t;
+ }
}
}
+
+ void append(T &&t) {
+ if (s == a)
+ realloc(s, s << 1);
+ const int idx = s++;
+ if (QTypeInfo<T>::isComplex)
+ new (ptr + idx) T(std::move(t));
+ else
+ ptr[idx] = std::move(t);
+ }
+
void append(const T *buf, int size);
inline QVarLengthArray<T, Prealloc> &operator<<(const T &t)
{ append(t); return *this; }
@@ -208,6 +228,7 @@ public:
// STL compatibility:
inline bool empty() const { return isEmpty(); }
inline void push_back(const T &t) { append(t); }
+ void push_back(T &&t) { append(std::move(t)); }
inline void pop_back() { removeLast(); }
inline T &front() { return first(); }
inline const T &front() const { return first(); }
diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc
index 5e53a969e8..127afcd069 100644
--- a/src/corelib/tools/qvarlengtharray.qdoc
+++ b/src/corelib/tools/qvarlengtharray.qdoc
@@ -303,6 +303,34 @@
*/
/*!
+ \fn void QVarLengthArray::append(T &&t)
+ \overload append
+ \since 5.9
+
+ \note Unlike the lvalue overload of append(), passing a reference to
+ an object that is already an element of \c *this leads to undefined
+ behavior:
+
+ \code
+ vla.append(std::move(vla[0])); // BUG: passing an object that is already in the container
+ \endcode
+*/
+
+/*!
+ \fn void QVarLengthArray::push_back(T &&t)
+ \overload push_back
+ \since 5.9
+
+ \note Unlike the lvalue overload of push_back(), passing a reference to
+ an object that is already an element of \c *this leads to undefined
+ behavior:
+
+ \code
+ vla.push_back(std::move(vla[0])); // BUG: passing an object that is already in the container
+ \endcode
+*/
+
+/*!
\fn inline void QVarLengthArray::removeLast()
\since 4.5