diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-11-10 18:15:09 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-11-10 18:15:09 (GMT) |
commit | cd4cab01810b817cdf8eb80ab9fc3174a798dd10 (patch) | |
tree | a849171a850e91851e871544d1e49a56484d37c7 /src/corelib/global | |
parent | d895af5713a7b7ee011b2b29cb5844fbf964df5e (diff) | |
parent | 7005ca9f0f6b1e535ad2b26d3fcf46dffacc3f13 (diff) | |
download | Qt-cd4cab01810b817cdf8eb80ab9fc3174a798dd10.zip Qt-cd4cab01810b817cdf8eb80ab9fc3174a798dd10.tar.gz Qt-cd4cab01810b817cdf8eb80ab9fc3174a798dd10.tar.bz2 |
Merge branch '4.6'
Conflicts:
src/gui/styles/qcommonstyle.cpp
tools/assistant/lib/lib.pro
tools/assistant/lib/qhelp_global.cpp
tools/assistant/tools/assistant/assistant.qch
tools/assistant/tools/assistant/mainwindow.cpp
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qconfig-minimal.h | 6 | ||||
-rw-r--r-- | src/corelib/global/qfeatures.h | 256 | ||||
-rw-r--r-- | src/corelib/global/qfeatures.txt | 106 | ||||
-rw-r--r-- | src/corelib/global/qglobal.cpp | 93 | ||||
-rw-r--r-- | src/corelib/global/qglobal.h | 33 | ||||
-rw-r--r-- | src/corelib/global/qlibraryinfo.cpp | 2 | ||||
-rw-r--r-- | src/corelib/global/qlibraryinfo.h | 2 | ||||
-rw-r--r-- | src/corelib/global/qmalloc.cpp | 58 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.h | 113 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 145 |
10 files changed, 575 insertions, 239 deletions
diff --git a/src/corelib/global/qconfig-minimal.h b/src/corelib/global/qconfig-minimal.h index 3d9539e..58565d6 100644 --- a/src/corelib/global/qconfig-minimal.h +++ b/src/corelib/global/qconfig-minimal.h @@ -123,9 +123,6 @@ #endif /* Images */ -#ifndef QT_NO_ICON -# define QT_NO_ICON -#endif #ifndef QT_NO_IMAGEFORMATPLUGIN # define QT_NO_IMAGEFORMATPLUGIN #endif @@ -258,9 +255,6 @@ #ifndef QT_NO_TEXTHTMLPARSER # define QT_NO_TEXTHTMLPARSER #endif -#ifndef QT_NO_THREAD -# define QT_NO_THREAD -#endif #ifndef QT_NO_CONCURRENT # define QT_NO_CONCURRENT #endif diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h index 36c2cf9..77785e8 100644 --- a/src/corelib/global/qfeatures.h +++ b/src/corelib/global/qfeatures.h @@ -43,6 +43,7 @@ * All features and their dependencies. * * This list is generated from $QTDIR/src/corelib/global/qfeatures.txt + * by $QTSRCDIR/util/scripts/make_qfeatures_dot_h */ // QAction @@ -54,6 +55,9 @@ // Color Names //#define QT_NO_COLORNAMES +// QtConcurrent +//#define QT_NO_CONCURRENT + // QCopChannel //#define QT_NO_COP @@ -75,15 +79,15 @@ // Effects //#define QT_NO_EFFECTS +// QFileSystemWatcher +//#define QT_NO_FILESYSTEMWATCHER + // Freetype Font Engine //#define QT_NO_FREETYPE // QGroupBox //#define QT_NO_GROUPBOX -// QIcon -//#define QT_NO_ICON - // QImageIOPlugin //#define QT_NO_IMAGEFORMATPLUGIN @@ -147,15 +151,15 @@ // Phonon::ObjectDescriptionModel //#define QT_NO_PHONON_OBJECTDESCRIPTIONMODEL -// Phonon::PlatformPlugin -//#define QT_NO_PHONON_PLATFORMPLUGIN - // Phonon::VideoWidget //#define QT_NO_PHONON_VIDEO // QPicture //#define QT_NO_PICTURE +// QProcess +//#define QT_NO_PROCESS + // QProgressBar //#define QT_NO_PROGRESSBAR @@ -174,9 +178,6 @@ // Decoration //#define QT_NO_QWS_DECORATION_DEFAULT -// QWSInputMethod -//#define QT_NO_QWS_INPUTMETHODS - // Keyboard //#define QT_NO_QWS_KEYBOARD @@ -261,6 +262,9 @@ // QSystemSemaphore //#define QT_NO_SYSTEMSEMAPHORE +// QSystemTrayIcon +//#define QT_NO_SYSTEMTRAYICON + // QTabletEvent //#define QT_NO_TABLETEVENT @@ -279,9 +283,6 @@ // QTextStream //#define QT_NO_TEXTSTREAM -// QThread -//#define QT_NO_THREAD - // QToolTip //#define QT_NO_TOOLTIP @@ -306,11 +307,6 @@ // //#define QT_NO_XMLSTREAM -// Accessibility -#if !defined(QT_NO_ACCESSIBILITY) && (defined(QT_NO_PROPERTIES)) -#define QT_NO_ACCESSIBILITY -#endif - // Animation #if !defined(QT_NO_ANIMATION) && (defined(QT_NO_PROPERTIES)) #define QT_NO_ANIMATION @@ -331,11 +327,6 @@ #define QT_NO_CODECS #endif -// QtConcurrent -#if !defined(QT_NO_CONCURRENT) && (defined(QT_NO_THREAD)) -#define QT_NO_CONCURRENT -#endif - // QDate/QTime/QDateTime #if !defined(QT_NO_DATESTRING) && (defined(QT_NO_TEXTDATE)) #define QT_NO_DATESTRING @@ -346,9 +337,9 @@ #define QT_NO_DIAL #endif -// QFileSystemWatcher -#if !defined(QT_NO_FILESYSTEMWATCHER) && (defined(QT_NO_THREAD)) -#define QT_NO_FILESYSTEMWATCHER +// QFileSystemModel +#if !defined(QT_NO_FILESYSTEMMODEL) && (defined(QT_NO_FILESYSTEMWATCHER)) +#define QT_NO_FILESYSTEMMODEL #endif // QHostInfo @@ -386,16 +377,6 @@ #define QT_NO_PHONON_VOLUMEFADEREFFECT #endif -// Phonon::VolumeSlider -#if !defined(QT_NO_PHONON_VOLUMESLIDER) && (defined(QT_NO_SLIDER)) -#define QT_NO_PHONON_VOLUMESLIDER -#endif - -// QProcess -#if !defined(QT_NO_PROCESS) && (defined(QT_NO_THREAD)) -#define QT_NO_PROCESS -#endif - // QProgressDialog #if !defined(QT_NO_PROGRESSDIALOG) && (defined(QT_NO_PROGRESSBAR)) #define QT_NO_PROGRESSDIALOG @@ -426,6 +407,16 @@ #define QT_NO_QWS_MANAGER #endif +// QVncTransformed +#if !defined(QT_NO_QWS_TRANSFORMED) && (defined(QT_NO_QWS_PROXYSCREEN)) +#define QT_NO_QWS_TRANSFORMED +#endif + +// QVncScreen +#if !defined(QT_NO_QWS_VNC) && (defined(QT_NO_QWS_PROXYSCREEN)) +#define QT_NO_QWS_VNC +#endif + // QScrollBar #if !defined(QT_NO_SCROLLBAR) && (defined(QT_NO_SLIDER)) #define QT_NO_SCROLLBAR @@ -441,6 +432,11 @@ #define QT_NO_SOCKS5 #endif +// QSoftKeyManager +#if !defined(QT_NO_SOFTKEYMANAGER) && (defined(QT_NO_ACTION)) +#define QT_NO_SOFTKEYMANAGER +#endif + // QSplitter #if !defined(QT_NO_SPLITTER) && (defined(QT_NO_RUBBERBAND)) #define QT_NO_SPLITTER @@ -466,9 +462,9 @@ #define QT_NO_SXE #endif -// QSystemTrayIcon -#if !defined(QT_NO_SYSTEMTRAYICON) && (defined(QT_NO_ICON)) -#define QT_NO_SYSTEMTRAYICON +// QToolButton +#if !defined(QT_NO_TOOLBUTTON) && (defined(QT_NO_ACTION)) +#define QT_NO_TOOLBUTTON #endif // QUndoStack @@ -501,11 +497,6 @@ #define QT_NO_CONTEXTMENU #endif -// QFileSystemModel -#if !defined(QT_NO_FILESYSTEMMODEL) && (defined(QT_NO_FILESYSTEMWATCHER)) -#define QT_NO_FILESYSTEMMODEL -#endif - // File Transfer Protocol #if !defined(QT_NO_FTP) && (defined(QT_NO_URLINFO) || defined(QT_NO_TEXTDATE)) #define QT_NO_FTP @@ -521,9 +512,9 @@ #define QT_NO_LIBRARY #endif -// QPrinter -#if !defined(QT_NO_PRINTER) && (defined(QT_NO_TEXTSTREAM) || defined(QT_NO_PICTURE)) -#define QT_NO_PRINTER +// Phonon::AbstractMediaStream +#if !defined(QT_NO_PHONON_SETTINGSGROUP) && (defined(QT_NO_SETTINGS)) +#define QT_NO_PHONON_SETTINGSGROUP #endif // QScrollArea @@ -531,21 +522,36 @@ #define QT_NO_SCROLLAREA #endif +// QWindowsVistaStyle +#if !defined(QT_NO_STYLE_WINDOWSVISTA) && (defined(QT_NO_STYLE_WINDOWSXP)) +#define QT_NO_STYLE_WINDOWSVISTA +#endif + +// QTabBar +#if !defined(QT_NO_TABBAR) && (defined(QT_NO_TOOLBUTTON)) +#define QT_NO_TABBAR +#endif + // OdfWriter #if !defined(QT_NO_TEXTODFWRITER) && (defined(QT_NO_XMLSTREAMWRITER)) #define QT_NO_TEXTODFWRITER #endif -// QToolButton -#if !defined(QT_NO_TOOLBUTTON) && (defined(QT_NO_ICON) || defined(QT_NO_ACTION)) -#define QT_NO_TOOLBUTTON -#endif - // Translation (UTF-8 representation) #if !defined(QT_NO_TRANSLATION_UTF8) && (defined(QT_NO_TRANSLATION) || defined(QT_NO_TEXTCODEC)) #define QT_NO_TRANSLATION_UTF8 #endif +// QUndoGroup +#if !defined(QT_NO_UNDOGROUP) && (defined(QT_NO_UNDOSTACK)) +#define QT_NO_UNDOGROUP +#endif + +// QWhatsThis +#if !defined(QT_NO_WHATSTHIS) && (defined(QT_NO_TOOLBUTTON)) +#define QT_NO_WHATSTHIS +#endif + // Drag and drop #if !defined(QT_NO_DRAGANDDROP) && (defined(QT_NO_QWS_PROPERTIES) || defined(QT_NO_IMAGEFORMAT_XPM)) #define QT_NO_DRAGANDDROP @@ -556,11 +562,31 @@ #define QT_NO_GRAPHICSVIEW #endif +// QInputContext +#if !defined(QT_NO_IM) && (defined(QT_NO_LIBRARY)) +#define QT_NO_IM +#endif + // QMdiArea #if !defined(QT_NO_MDIAREA) && (defined(QT_NO_SCROLLAREA)) #define QT_NO_MDIAREA #endif +// Phonon::PlatformPlugin +#if !defined(QT_NO_PHONON_PLATFORMPLUGIN) && (defined(QT_NO_LIBRARY)) +#define QT_NO_PHONON_PLATFORMPLUGIN +#endif + +// Phonon::VolumeSlider +#if !defined(QT_NO_PHONON_VOLUMESLIDER) && (defined(QT_NO_SLIDER) || defined(QT_NO_TOOLBUTTON)) +#define QT_NO_PHONON_VOLUMESLIDER +#endif + +// QPrinter +#if !defined(QT_NO_PRINTER) && (defined(QT_NO_TEXTSTREAM) || defined(QT_NO_PICTURE) || defined(QT_NO_TEMPORARYFILE)) +#define QT_NO_PRINTER +#endif + // QSpinBox #if !defined(QT_NO_SPINBOX) && (defined(QT_NO_SPINWIDGET) || defined(QT_NO_LINEEDIT) || defined(QT_NO_VALIDATOR)) #define QT_NO_SPINBOX @@ -591,24 +617,24 @@ #define QT_NO_STYLE_WINDOWSMOBILE #endif -// QWindowsVistaStyle -#if !defined(QT_NO_STYLE_WINDOWSVISTA) && (defined(QT_NO_STYLE_WINDOWS) || defined(QT_NO_STYLE_WINDOWSXP)) -#define QT_NO_STYLE_WINDOWSVISTA -#endif - // QtSvg module #if !defined(QT_NO_SVG) && (defined(QT_NO_XMLSTREAMREADER) || defined(QT_NO_CSSPARSER)) #define QT_NO_SVG #endif -// QTabBar -#if !defined(QT_NO_TABBAR) && (defined(QT_NO_TOOLBUTTON)) -#define QT_NO_TABBAR +// Q3TabDialog +#if !defined(QT_NO_TABDIALOG) && (defined(QT_NO_TABBAR)) +#define QT_NO_TABDIALOG #endif -// QUndoGroup -#if !defined(QT_NO_UNDOGROUP) && (defined(QT_NO_UNDOCOMMAND) || defined(QT_NO_UNDOSTACK)) -#define QT_NO_UNDOGROUP +// QColorDialog +#if !defined(QT_NO_COLORDIALOG) && (defined(QT_NO_SPINBOX)) +#define QT_NO_COLORDIALOG +#endif + +// QGraphicsEffect +#if !defined(QT_NO_GRAPHICSEFFECT) && (defined(QT_NO_GRAPHICSVIEW)) +#define QT_NO_GRAPHICSEFFECT #endif // The Model/View Framework @@ -616,6 +642,16 @@ #define QT_NO_ITEMVIEWS #endif +// QMenuBar +#if !defined(QT_NO_MENUBAR) && (defined(QT_NO_MENU) || defined(QT_NO_TOOLBUTTON)) +#define QT_NO_MENUBAR +#endif + +// QWSInputMethod +#if !defined(QT_NO_QWS_INPUTMETHODS) && (defined(QT_NO_IM)) +#define QT_NO_QWS_INPUTMETHODS +#endif + // Sound Server #if !defined(QT_NO_QWS_SOUNDSERVER) && (defined(QT_NO_SOUND) || defined(QT_NO_HOSTINFO) || defined(QT_NO_QWS_MULTIPROCESS)) #define QT_NO_QWS_SOUNDSERVER @@ -631,9 +667,9 @@ #define QT_NO_SVGRENDERER #endif -// Q3TabDialog -#if !defined(QT_NO_TABDIALOG) && (defined(QT_NO_TABBAR)) -#define QT_NO_TABDIALOG +// QTabWidget +#if !defined(QT_NO_TABWIDGET) && (defined(QT_NO_TABBAR) || defined(QT_NO_STACKEDWIDGET)) +#define QT_NO_TABWIDGET #endif // QTextCodecPlugin @@ -646,16 +682,6 @@ #define QT_NO_TEXTEDIT #endif -// QWhatsThis -#if !defined(QT_NO_WHATSTHIS) && (defined(QT_NO_TOOLBUTTON) || defined(QT_NO_ACTION)) -#define QT_NO_WHATSTHIS -#endif - -// QDirModel -#if !defined(QT_NO_DIRMODEL) && (defined(QT_NO_ITEMVIEWS)) -#define QT_NO_DIRMODEL -#endif - // QErrorMessage #if !defined(QT_NO_ERRORMESSAGE) && (defined(QT_NO_TEXTEDIT)) #define QT_NO_ERRORMESSAGE @@ -666,9 +692,9 @@ #define QT_NO_LISTVIEW #endif -// QMenuBar -#if !defined(QT_NO_MENUBAR) && (defined(QT_NO_MENU) || defined(QT_NO_TOOLBUTTON)) -#define QT_NO_MENUBAR +// QMainWindow +#if !defined(QT_NO_MAINWINDOW) && (defined(QT_NO_MENU) || defined(QT_NO_RESIZEHANDLER) || defined(QT_NO_TOOLBUTTON)) +#define QT_NO_MAINWINDOW #endif // QAbstractProxyModel @@ -701,24 +727,24 @@ #define QT_NO_TABLEVIEW #endif -// QTabWidget -#if !defined(QT_NO_TABWIDGET) && (defined(QT_NO_TABBAR) || defined(QT_NO_STACKEDWIDGET)) -#define QT_NO_TABWIDGET -#endif - // QTextBrowser #if !defined(QT_NO_TEXTBROWSER) && (defined(QT_NO_TEXTEDIT)) #define QT_NO_TEXTBROWSER #endif +// QToolBox +#if !defined(QT_NO_TOOLBOX) && (defined(QT_NO_TOOLBUTTON) || defined(QT_NO_SCROLLAREA)) +#define QT_NO_TOOLBOX +#endif + // QTreeView #if !defined(QT_NO_TREEVIEW) && (defined(QT_NO_ITEMVIEWS)) #define QT_NO_TREEVIEW #endif -// QColorDialog -#if !defined(QT_NO_COLORDIALOG) && (defined(QT_NO_LINEEDIT) || defined(QT_NO_VALIDATOR) || defined(QT_NO_SPINBOX)) -#define QT_NO_COLORDIALOG +// Accessibility +#if !defined(QT_NO_ACCESSIBILITY) && (defined(QT_NO_PROPERTIES) || defined(QT_NO_MENUBAR)) +#define QT_NO_ACCESSIBILITY #endif // QColumnView @@ -731,11 +757,6 @@ #define QT_NO_COMPLETER #endif -// Common UNIX Printing System -#if !defined(QT_NO_CUPS) && (defined(QT_NO_PRINTER) || defined(QT_NO_LIBRARY)) -#define QT_NO_CUPS -#endif - // QDataWidgetMapper #if !defined(QT_NO_DATAWIDGETMAPPER) && (defined(QT_NO_ITEMVIEWS) || defined(QT_NO_PROPERTIES)) #define QT_NO_DATAWIDGETMAPPER @@ -746,11 +767,6 @@ #define QT_NO_LISTWIDGET #endif -// QMainWindow -#if !defined(QT_NO_MAINWINDOW) && (defined(QT_NO_MENU) || defined(QT_NO_RESIZEHANDLER) || defined(QT_NO_TOOLBUTTON)) -#define QT_NO_MAINWINDOW -#endif - // QSortFilterProxyModel #if !defined(QT_NO_SORTFILTERPROXYMODEL) && (defined(QT_NO_PROXYMODEL)) #define QT_NO_SORTFILTERPROXYMODEL @@ -761,24 +777,24 @@ #define QT_NO_TABLEWIDGET #endif +// QToolBar +#if !defined(QT_NO_TOOLBAR) && (defined(QT_NO_MAINWINDOW)) +#define QT_NO_TOOLBAR +#endif + // QTreeWidget #if !defined(QT_NO_TREEWIDGET) && (defined(QT_NO_TREEVIEW)) #define QT_NO_TREEWIDGET #endif -// QPrintPreviewWidget -#if !defined(QT_NO_PRINTPREVIEWWIDGET) && (defined(QT_NO_GRAPHICSVIEW) || defined(QT_NO_PRINTER)) -#define QT_NO_PRINTPREVIEWWIDGET -#endif - -// QToolBar -#if !defined(QT_NO_TOOLBAR) && (defined(QT_NO_MAINWINDOW)) -#define QT_NO_TOOLBAR +// Common UNIX Printing System +#if !defined(QT_NO_CUPS) && (defined(QT_NO_PRINTER) || defined(QT_NO_LIBRARY)) +#define QT_NO_CUPS #endif -// QToolBox -#if !defined(QT_NO_TOOLBOX) && (defined(QT_NO_ICON) || defined(QT_NO_TOOLBUTTON) || defined(QT_NO_SCROLLAREA)) -#define QT_NO_TOOLBOX +// QDirModel +#if !defined(QT_NO_DIRMODEL) && (defined(QT_NO_ITEMVIEWS) || defined(QT_NO_FILESYSTEMMODEL)) +#define QT_NO_DIRMODEL #endif // QDockwidget @@ -791,6 +807,11 @@ #define QT_NO_UNDOVIEW #endif +// QCompleter +#if !defined(QT_NO_FSCOMPLETER) && (defined(QT_NO_FILESYSTEMMODEL) || defined(QT_NO_COMPLETER)) +#define QT_NO_FSCOMPLETER +#endif + // QGraphicsSvgItem #if !defined(QT_NO_GRAPHICSSVGITEM) && (defined(QT_NO_SVGRENDERER) || defined(QT_NO_GRAPHICSVIEW)) #define QT_NO_GRAPHICSSVGITEM @@ -801,6 +822,16 @@ #define QT_NO_COMBOBOX #endif +// QWorkSpace +#if !defined(QT_NO_WORKSPACE) && (defined(QT_NO_SCROLLBAR) || defined(QT_NO_MAINWINDOW) || defined(QT_NO_MENUBAR)) +#define QT_NO_WORKSPACE +#endif + +// QPrintPreviewWidget +#if !defined(QT_NO_PRINTPREVIEWWIDGET) && (defined(QT_NO_GRAPHICSVIEW) || defined(QT_NO_PRINTER) || defined(QT_NO_MAINWINDOW)) +#define QT_NO_PRINTPREVIEWWIDGET +#endif + // QCalendarWidget #if !defined(QT_NO_CALENDARWIDGET) && (defined(QT_NO_TABLEVIEW) || defined(QT_NO_MENU) || defined(QT_NO_TEXTDATE) || defined(QT_NO_SPINBOX) || defined(QT_NO_TOOLBUTTON)) #define QT_NO_CALENDARWIDGET @@ -831,23 +862,18 @@ #define QT_NO_FONTDIALOG #endif -// QWorkSpace -#if !defined(QT_NO_WORKSPACE) && (defined(QT_NO_SCROLLBAR) || defined(QT_NO_RESIZEHANDLER) || defined(QT_NO_MENU) || defined(QT_NO_TOOLBUTTON) || defined(QT_NO_MAINWINDOW) || defined(QT_NO_TOOLBAR) || defined(QT_NO_MENUBAR)) -#define QT_NO_WORKSPACE -#endif - // QPrintDialog -#if !defined(QT_NO_PRINTDIALOG) && (defined(QT_NO_PRINTER) || defined(QT_NO_COMBOBOX) || defined(QT_NO_BUTTONGROUP) || defined(QT_NO_SPINBOX) || defined(QT_NO_TREEVIEW) || defined(QT_NO_STACKEDWIDGET) || defined(QT_NO_TABWIDGET)) +#if !defined(QT_NO_PRINTDIALOG) && (defined(QT_NO_PRINTER) || defined(QT_NO_COMBOBOX) || defined(QT_NO_BUTTONGROUP) || defined(QT_NO_SPINBOX) || defined(QT_NO_TREEVIEW) || defined(QT_NO_TABWIDGET)) #define QT_NO_PRINTDIALOG #endif // QFileDialog -#if !defined(QT_NO_FILEDIALOG) && (defined(QT_NO_DIRMODEL) || defined(QT_NO_TREEVIEW) || defined(QT_NO_COMBOBOX) || defined(QT_NO_TOOLBUTTON) || defined(QT_NO_BUTTONGROUP) || defined(QT_NO_TOOLTIP) || defined(QT_NO_SPLITTER) || defined(QT_NO_STACKEDWIDGET) || defined(QT_NO_FILESYSTEMMODEL)) +#if !defined(QT_NO_FILEDIALOG) && (defined(QT_NO_DIRMODEL) || defined(QT_NO_TREEVIEW) || defined(QT_NO_COMBOBOX) || defined(QT_NO_TOOLBUTTON) || defined(QT_NO_BUTTONGROUP) || defined(QT_NO_TOOLTIP) || defined(QT_NO_SPLITTER) || defined(QT_NO_STACKEDWIDGET) || defined(QT_NO_PROXYMODEL)) #define QT_NO_FILEDIALOG #endif // QPrintPreviewDialog -#if !defined(QT_NO_PRINTPREVIEWDIALOG) && (defined(QT_NO_PRINTPREVIEWWIDGET) || defined(QT_NO_PRINTDIALOG) || defined(QT_NO_MAINWINDOW)) +#if !defined(QT_NO_PRINTPREVIEWDIALOG) && (defined(QT_NO_PRINTPREVIEWWIDGET) || defined(QT_NO_PRINTDIALOG) || defined(QT_NO_TOOLBAR)) #define QT_NO_PRINTPREVIEWDIALOG #endif diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt index ec47883..ec4945f 100644 --- a/src/corelib/global/qfeatures.txt +++ b/src/corelib/global/qfeatures.txt @@ -28,17 +28,10 @@ Requires: Name: CssParser SeeAlso: ??? -Feature: THREAD -Description: Supports multithreaded programming. -Section: Kernel -Requires: -Name: QThread -SeeAlso: ??? - Feature: CONCURRENT Description: Provides a high-level multi-threaded APIs Section: Kernel -Requires: THREAD +Requires: Name: QtConcurrent SeeAlso: ??? @@ -70,6 +63,13 @@ Requires: Name: QAction SeeAlso: ??? +Feature: SOFTKEYMANAGER +Description: Supports softkeys. +Section: Gui +Requires: ACTION +Name: QSoftKeyManager +SeeAlso: ??? + Feature: CURSOR Description: Supports mouse cursors. Section: Kernel @@ -147,6 +147,12 @@ Requires: XMLSTREAM Name: QXmlStreamWriter SeeAlso: ??? +Feature: IM +Description: Inputmethods with QInputContext +Section: Kernel +Requires: LIBRARY +Name: QInputContext +SeeAlso: ??? # Data structures Feature: STL @@ -182,7 +188,7 @@ SeeAlso: ??? Feature: PROCESS Description: Supports external process invocation. Section: File I/O -Requires: THREAD +Requires: Name: QProcess SeeAlso: ??? @@ -232,7 +238,7 @@ Feature: FILESYSTEMWATCHER Description: Provides an interface for monitoring files and directories for modications. Section: File I/O -Requires: THREAD +Requires: Name: QFileSystemWatcher SeeAlso: ??? @@ -339,7 +345,7 @@ SeeAlso: ??? Feature: COMBOBOX Description: Supports comboboxes presenting a list of options to the user. Section: Widgets -Requires: LINEEDIT STANDARDITEMMODEL LISTVIEW +Requires: LINEEDIT STANDARDITEMMODEL LISTVIEW Name: QComboBox SeeAlso: ??? @@ -353,7 +359,7 @@ SeeAlso: ??? Feature: TOOLBUTTON Description: Supports quick-access buttons to commands and options. Section: Widgets -Requires: ICON ACTION +Requires: ACTION Name: QToolButton SeeAlso: ??? @@ -367,7 +373,7 @@ SeeAlso: ??? Feature: TOOLBOX Description: Supports columns of tabbed widget items. Section: Widgets -Requires: ICON TOOLBUTTON SCROLLAREA +Requires: TOOLBUTTON SCROLLAREA Name: QToolBox SeeAlso: ??? @@ -403,7 +409,7 @@ SeeAlso: ??? Feature: WORKSPACE Description: Supports workspace windows, e.g. used in an MDI application. Section: Widgets -Requires: SCROLLBAR RESIZEHANDLER MENU TOOLBUTTON MAINWINDOW TOOLBAR MENUBAR +Requires: SCROLLBAR MAINWINDOW MENUBAR Name: QWorkSpace SeeAlso: ??? @@ -485,6 +491,13 @@ Requires: SCROLLAREA Name: QGraphicsView SeeAlso: ??? +Feature: GRAPHICSEFFECT +Description: Supports the graphicseffect classes. +Section: Widgets +Requires: GRAPHICSVIEW +Name: QGraphicsEffect +SeeAlso: ??? + Feature: SPINWIDGET Description: Supports spinbox control widgets. Section: Widgets @@ -537,7 +550,7 @@ SeeAlso: ??? Feature: WHATSTHIS Description: Supports displaying "What's this" help. Section: Widgets -Requires: TOOLBUTTON ACTION +Requires: TOOLBUTTON Name: QWhatsThis SeeAlso: ??? @@ -567,7 +580,7 @@ Feature: PRINTPREVIEWWIDGET Description: Provides a widget for previewing page layouts for printer output. a date. Section: Widgets -Requires: GRAPHICSVIEW PRINTER +Requires: GRAPHICSVIEW PRINTER MAINWINDOW Name: QPrintPreviewWidget SeeAlso: ??? @@ -584,14 +597,14 @@ SeeAlso: ??? Feature: COLORDIALOG Description: Supports a dialog widget for specifying colors. Section: Dialogs -Requires: LINEEDIT VALIDATOR SPINBOX +Requires: SPINBOX Name: QColorDialog SeeAlso: ??? Feature: FILEDIALOG Description: Supports a dialog widget for selecting files or directories. Section: Dialogs -Requires: DIRMODEL TREEVIEW COMBOBOX TOOLBUTTON BUTTONGROUP TOOLTIP SPLITTER STACKEDWIDGET FILESYSTEMMODEL +Requires: DIRMODEL TREEVIEW COMBOBOX TOOLBUTTON BUTTONGROUP TOOLTIP SPLITTER STACKEDWIDGET PROXYMODEL Name: QFileDialog SeeAlso: ??? @@ -605,14 +618,14 @@ SeeAlso: ??? Feature: PRINTDIALOG Description: Supports a dialog widget for specifying printer configuration. Section: Dialogs -Requires: PRINTER COMBOBOX BUTTONGROUP SPINBOX TREEVIEW STACKEDWIDGET TABWIDGET +Requires: PRINTER COMBOBOX BUTTONGROUP SPINBOX TREEVIEW TABWIDGET Name: QPrintDialog SeeAlso: ??? Feature: PRINTPREVIEWDIALOG Description: Provides a dialog for previewing and configuring page layouts for printer output. Section: Dialogs -Requires: PRINTPREVIEWWIDGET PRINTDIALOG MAINWINDOW +Requires: PRINTPREVIEWWIDGET PRINTDIALOG TOOLBAR Name: QPrintPreviewDialog SeeAlso: ??? @@ -664,7 +677,7 @@ SeeAlso: ??? Feature: DIRMODEL Description: Supports a data model for the local filesystem. Section: ItemViews -Requires: ITEMVIEWS +Requires: ITEMVIEWS FILESYSTEMMODEL Name: QDirModel SeeAlso: ??? @@ -772,7 +785,7 @@ SeeAlso: ??? Feature: STYLE_WINDOWSVISTA Description: Supports a Microsoft WindowsVista-like look and feel. Section: Styles -Requires: STYLE_WINDOWS STYLE_WINDOWSXP +Requires: STYLE_WINDOWSXP Name: QWindowsVistaStyle SeeAlso: ??? @@ -813,13 +826,6 @@ Requires: Name: QImageIOPlugin SeeAlso: ??? -Feature: ICON -Description: Supports scalable icons in different modes and states. -Section: Images -Requires: -Name: QIcon -SeeAlso: ??? - Feature: MOVIE Description: Supports animated images. Section: Images @@ -910,7 +916,7 @@ SeeAlso: ??? Feature: PRINTER Description: Supports printing Section: Painting -Requires: TEXTSTREAM PICTURE +Requires: TEXTSTREAM PICTURE TEMPORARYFILE Name: QPrinter SeeAlso: ??? @@ -1014,7 +1020,7 @@ SeeAlso: ??? Feature: QWS_INPUTMETHODS Description: Supports international input methods. Section: Internationalization -Requires: +Requires: IM Name: QWSInputMethod SeeAlso: ??? @@ -1101,6 +1107,13 @@ Requires: PROXYMODEL Name: QCompleter SeeAlso: ??? +Feature: FSCOMPLETER +Description: Provides completions based on an item model. +Section: Utilities +Requires: FILESYSTEMMODEL COMPLETER +Name: QCompleter +SeeAlso: ??? + Feature: DESKTOPSERVICES Description: Provides methods for accessing common desktop services. Section: Utilities @@ -1111,7 +1124,7 @@ SeeAlso: ??? Feature: SYSTEMTRAYICON Description: Provides an icon for an application in the system tray. Section: Utilities -Requires: ICON +Requires: Name: QSystemTrayIcon SeeAlso: ??? @@ -1132,7 +1145,7 @@ SeeAlso: ??? Feature: UNDOGROUP Description: Section: Utilities -Requires: UNDOCOMMAND UNDOSTACK +Requires: UNDOSTACK Name: QUndoGroup SeeAlso: ??? @@ -1146,7 +1159,7 @@ SeeAlso: ??? Feature: ACCESSIBILITY Description: Provides accessibility support. Section: Utilities -Requires: PROPERTIES +Requires: PROPERTIES MENUBAR Name: Accessibility SeeAlso: ??? @@ -1317,6 +1330,20 @@ Requires: Name: QProxyScreen SeeAlso: ??? +Feature: QWS_VNC +Description: Provides VNC screen driver +Section: Qt for Embedded Linux +Requires: QWS_PROXYSCREEN +Name: QVncScreen +SeeAlso: ??? + +Feature: QWS_TRANSFORMED +Description: Provides Transformed screen driver +Section: Qt for Embedded Linux +Requires: QWS_PROXYSCREEN +Name: QVncTransformed +SeeAlso: ??? + Feature: QWS_DYNAMICSCREENTRANSFORMATION Description: Enables dynamic setting of screen transformation/rotation. Section: Qt for Embedded Linux @@ -1338,7 +1365,7 @@ SeeAlso: ??? Feature: PHONON_PLATFORMPLUGIN Description: Support for platform plugin Section: Phonon -Requires: +Requires: LIBRARY Name: Phonon::PlatformPlugin SeeAlso: ??? @@ -1403,7 +1430,7 @@ SeeAlso: ??? Feature: PHONON_VOLUMESLIDER Description: Support for the Volume Slider class Section: Phonon -Requires: SLIDER +Requires: SLIDER TOOLBUTTON Name: Phonon::VolumeSlider SeeAlso: ??? @@ -1420,3 +1447,10 @@ Section: Phonon Requires: Name: Phonon::AbstractMediaStream SeeAlso: ??? + +Feature: PHONON_SETTINGSGROUP +Description: Phonon settingsgroup +Section: Phonon +Requires: SETTINGS +Name: Phonon::AbstractMediaStream +SeeAlso: ??? diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 7d47944..62b5409 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -960,7 +960,7 @@ QT_BEGIN_NAMESPACE \relates <QtGlobal> Turns the major, minor and patch numbers of a version into an - integer, 0xMMNNPP (MM = major, NN = minor, PP = patch). This can + integer, 0xMMNNPP (MM = major, NN = minor, PP = patch). This can be compared with another similarly processed version id. \sa QT_VERSION @@ -1191,6 +1191,10 @@ bool qSharedBuild() \value SV_9_2 Symbian OS v9.2 \value SV_9_3 Symbian OS v9.3 \value SV_9_4 Symbian OS v9.4 + \value SV_SF_1 Symbian^1 + \value SV_SF_2 Symbian^2 + \value SV_SF_3 Symbian^3 + \value SV_SF_4 Symbian^4 \value SV_Unknown An unknown and currently unsupported platform \sa S60Version, WinVersion, MacVersion @@ -1207,6 +1211,8 @@ bool qSharedBuild() \value SV_S60_3_1 S60 3rd Edition Feature Pack 1 \value SV_S60_3_2 S60 3rd Edition Feature Pack 2 \value SV_S60_5_0 S60 5th Edition + \value SV_S60_5_1 S60 5th Edition Feature Pack 1 + \value SV_S60_5_2 S60 5th Edition Feature Pack 2 \value SV_S60_Unknown An unknown and currently unsupported platform \omitvalue SV_S60_None @@ -1795,7 +1801,7 @@ QSysInfo::S60Version QSysInfo::s60Version() TInt err = fileFinder.FindWildByDir(qt_S60Filter, qt_S60SystemInstallDir, contents); if (err == KErrNone) { err = contents->Sort(EDescending|ESortByName); - if (err == KErrNone) { + if (err == KErrNone && contents->Count() > 0 && (*contents)[0].iName.Length() >= 12) { TInt major = (*contents)[0].iName[9] - '0'; TInt minor = (*contents)[0].iName[11] - '0'; if (major == 3) { @@ -1808,6 +1814,12 @@ QSysInfo::S60Version QSysInfo::s60Version() if (minor == 0) { return cachedS60Version = SV_S60_5_0; } + else if (minor == 1) { + return cachedS60Version = SV_S60_5_1; + } + else if (minor == 2) { + return cachedS60Version = SV_S60_5_2; + } } } delete contents; @@ -1822,12 +1834,10 @@ QSysInfo::S60Version QSysInfo::s60Version() return cachedS60Version = SV_S60_3_2; # elif defined(__S60_50__) return cachedS60Version = SV_S60_5_0; -# else - return cachedS60Version = SV_S60_Unknown; # endif -# else - return cachedS60Version = SV_S60_Unknown; # endif + //If reaching here, it was not possible to determine the version + return cachedS60Version = SV_S60_Unknown; } QSysInfo::SymbianVersion QSysInfo::symbianVersion() { @@ -1838,6 +1848,10 @@ QSysInfo::SymbianVersion QSysInfo::symbianVersion() return SV_9_3; case SV_S60_5_0: return SV_9_4; + case SV_S60_5_1: + return SV_9_4; + case SV_S60_5_2: + return SV_9_4; default: return SV_Unknown; } @@ -2513,10 +2527,19 @@ Q_GLOBAL_STATIC(SeedStorage, randTLS) // Thread Local Storage for seed value void qsrand(uint seed) { #if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD) && !defined(Q_OS_SYMBIAN) - SeedStorageType *pseed = randTLS()->localData(); - if (!pseed) - randTLS()->setLocalData(pseed = new SeedStorageType); - *pseed = seed; + SeedStorage *seedStorage = randTLS(); + if (seedStorage) { + SeedStorageType *pseed = seedStorage->localData(); + if (!pseed) + seedStorage->setLocalData(pseed = new SeedStorageType); + *pseed = seed; + } else { + //golbal static seed storage should always exist, + //except after being deleted by QGlobalStaticDeleter. + //But since it still can be called from destructor of another + //global static object, fallback to sqrand(seed) + srand(seed); + } #else // On Windows srand() and rand() already use Thread-Local-Storage // to store the seed between calls @@ -2536,21 +2559,24 @@ void qsrand(uint seed) void qsrand() { #if (defined(Q_OS_UNIX) || defined(Q_OS_WIN)) && !defined(QT_NO_THREAD) && !defined(Q_OS_SYMBIAN) - SeedStorageType *pseed = randTLS()->localData(); - if (pseed) { - // already seeded - return; - } - randTLS()->setLocalData(pseed = new SeedStorageType); - // start beyond 1 to avoid the sequence reset - static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(2); - *pseed = QDateTime::currentDateTime().toTime_t() - + quintptr(&pseed) - + serial.fetchAndAddRelaxed(1); + SeedStorage *seedStorage = randTLS(); + if (seedStorage) { + SeedStorageType *pseed = seedStorage->localData(); + if (pseed) { + // already seeded + return; + } + seedStorage->setLocalData(pseed = new SeedStorageType); + // start beyond 1 to avoid the sequence reset + static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(2); + *pseed = QDateTime::currentDateTime().toTime_t() + + quintptr(&pseed) + + serial.fetchAndAddRelaxed(1); #if defined(Q_OS_WIN) - // for Windows the srand function must still be called. - srand(*pseed); + // for Windows the srand function must still be called. + srand(*pseed); #endif + } #elif defined(Q_OS_WIN) static unsigned int seed = 0; @@ -2560,7 +2586,7 @@ void qsrand() seed = GetTickCount(); srand(seed); -#else +#else // Symbian? #endif // defined(Q_OS_UNIX) || defined(Q_OS_WIN)) && !defined(QT_NO_THREAD) && !defined(Q_OS_SYMBIAN) @@ -2584,12 +2610,21 @@ void qsrand() int qrand() { #if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD) && !defined(Q_OS_SYMBIAN) - SeedStorageType *pseed = randTLS()->localData(); - if (!pseed) { - randTLS()->setLocalData(pseed = new SeedStorageType); - *pseed = 1; + SeedStorage *seedStorage = randTLS(); + if (seedStorage) { + SeedStorageType *pseed = seedStorage->localData(); + if (!pseed) { + seedStorage->setLocalData(pseed = new SeedStorageType); + *pseed = 1; + } + return rand_r(pseed); + } else { + //golbal static seed storage should always exist, + //except after being deleted by QGlobalStaticDeleter. + //But since it still can be called from destructor of another + //global static object, fallback to qrand() + return rand(); } - return rand_r(pseed); #else // On Windows srand() and rand() already use Thread-Local-Storage // to store the seed between calls diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 470b41e..b58c9dd 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1207,6 +1207,11 @@ class QDataStream; # else # define Q_SVG_EXPORT Q_DECL_IMPORT # endif +# if defined(QT_BUILD_DECLARATIVE_LIB) +# define Q_DECLARATIVE_EXPORT Q_DECL_EXPORT +# else +# define Q_DECLARATIVE_EXPORT Q_DECL_IMPORT +# endif # if defined(QT_BUILD_OPENGL_LIB) # define Q_OPENGL_EXPORT Q_DECL_EXPORT # else @@ -1259,6 +1264,7 @@ class QDataStream; # define Q_SQL_EXPORT Q_DECL_IMPORT # define Q_NETWORK_EXPORT Q_DECL_IMPORT # define Q_SVG_EXPORT Q_DECL_IMPORT +# define Q_DECLARATIVE_EXPORT Q_DECL_IMPORT # define Q_CANVAS_EXPORT Q_DECL_IMPORT # define Q_OPENGL_EXPORT Q_DECL_IMPORT # define Q_MULTIMEDIA_EXPORT Q_DECL_IMPORT @@ -1287,6 +1293,7 @@ class QDataStream; # define Q_SQL_EXPORT Q_DECL_EXPORT # define Q_NETWORK_EXPORT Q_DECL_EXPORT # define Q_SVG_EXPORT Q_DECL_EXPORT +# define Q_DECLARATIVE_EXPORT Q_DECL_EXPORT # define Q_OPENGL_EXPORT Q_DECL_EXPORT # define Q_MULTIMEDIA_EXPORT Q_DECL_EXPORT # define Q_OPENVG_EXPORT Q_DECL_EXPORT @@ -1301,6 +1308,7 @@ class QDataStream; # define Q_SQL_EXPORT # define Q_NETWORK_EXPORT # define Q_SVG_EXPORT +# define Q_DECLARATIVE_EXPORT # define Q_OPENGL_EXPORT # define Q_MULTIMEDIA_EXPORT # define Q_XML_EXPORT @@ -1478,17 +1486,26 @@ public: #ifdef Q_OS_SYMBIAN enum SymbianVersion { SV_Unknown = 0x0000, + //These are the Symbian Ltd versions 9.2-9.4 SV_9_2 = 10, SV_9_3 = 20, - SV_9_4 = 30 + SV_9_4 = 30, + //Following values are the symbian foundation versions, i.e. Symbian^1 == SV_SF_1 + SV_SF_1 = SV_9_4, + SV_SF_2 = 40, + SV_SF_3 = 50, + SV_SF_4 = 60 }; static SymbianVersion symbianVersion(); enum S60Version { SV_S60_None = 0, SV_S60_Unknown = 1, - SV_S60_3_1 = 10, - SV_S60_3_2 = 20, - SV_S60_5_0 = 30 + SV_S60_3_1 = SV_9_2, + SV_S60_3_2 = SV_9_3, + SV_S60_5_0 = SV_9_4, + //versions beyond 5.0 are to be confirmed - it is better to use symbian version + SV_S60_5_1 = SV_SF_2, + SV_S60_5_2 = SV_SF_3 }; static S60Version s60Version(); #endif @@ -2065,6 +2082,9 @@ Q_DECLARE_TYPEINFO(long double, Q_PRIMITIVE_TYPE); Q_CORE_EXPORT void *qMalloc(size_t size); Q_CORE_EXPORT void qFree(void *ptr); Q_CORE_EXPORT void *qRealloc(void *ptr, size_t size); +Q_CORE_EXPORT void *qMallocAligned(size_t size, size_t alignment); +Q_CORE_EXPORT void *qReallocAligned(void *ptr, size_t size, size_t oldsize, size_t alignment); +Q_CORE_EXPORT void qFreeAligned(void *ptr); Q_CORE_EXPORT void *qMemCopy(void *dest, const void *src, size_t n); Q_CORE_EXPORT void *qMemSet(void *dest, int c, size_t n); @@ -2459,6 +2479,7 @@ Q_CORE_EXPORT int qt_symbian_exception2Error(const std::exception& ex); #define QT_MODULE_SCRIPTTOOLS 0x10000 #define QT_MODULE_OPENVG 0x20000 #define QT_MODULE_MULTIMEDIA 0x40000 +#define QT_MODULE_DECLARATIVE 0x80000 /* Qt editions */ #define QT_EDITION_CONSOLE (QT_MODULE_CORE \ @@ -2489,6 +2510,7 @@ Q_CORE_EXPORT int qt_symbian_exception2Error(const std::exception& ex); | QT_MODULE_QT3SUPPORTLIGHT \ | QT_MODULE_QT3SUPPORT \ | QT_MODULE_SVG \ + | QT_MODULE_DECLARATIVE \ | QT_MODULE_GRAPHICSVIEW \ | QT_MODULE_HELP \ | QT_MODULE_TEST \ @@ -2560,6 +2582,9 @@ QT_LICENSED_MODULE(Qt3Support) #if (QT_EDITION & QT_MODULE_SVG) QT_LICENSED_MODULE(Svg) #endif +#if (QT_EDITION & QT_MODULE_DECLARATIVE) +QT_LICENSED_MODULE(Declarative) +#endif #if (QT_EDITION & QT_MODULE_ACTIVEQT) QT_LICENSED_MODULE(ActiveQt) #endif diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 15a06d7..15325ae 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -212,11 +212,13 @@ QLibraryInfo::buildKey() Returns the installation date for this build of Qt. The install date will usually be the last time that Qt sources were configured. */ +#ifndef QT_NO_DATESTRING QDate QLibraryInfo::buildDate() { return QDate::fromString(QString::fromLatin1(qt_configure_installation + 12), Qt::ISODate); } +#endif //QT_NO_DATESTRING /*! Returns the location specified by \a loc. diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h index 88e8566..f65051d 100644 --- a/src/corelib/global/qlibraryinfo.h +++ b/src/corelib/global/qlibraryinfo.h @@ -60,7 +60,9 @@ public: static QString licensedProducts(); static QString buildKey(); +#ifndef QT_NO_DATESTRING static QDate buildDate(); +#endif //QT_NO_DATESTRING enum LibraryLocation { diff --git a/src/corelib/global/qmalloc.cpp b/src/corelib/global/qmalloc.cpp index a9f103c..4aab1bd 100644 --- a/src/corelib/global/qmalloc.cpp +++ b/src/corelib/global/qmalloc.cpp @@ -65,4 +65,62 @@ void *qRealloc(void *ptr, size_t size) return ::realloc(ptr, size); } +void *qMallocAligned(size_t size, size_t alignment) +{ + return qReallocAligned(0, size, 0, alignment); +} + +void *qReallocAligned(void *oldptr, size_t newsize, size_t oldsize, size_t alignment) +{ + // fake an aligned allocation + Q_UNUSED(oldsize); + + void *actualptr = oldptr ? static_cast<void **>(oldptr)[-1] : 0; + if (alignment <= sizeof(void*)) { + // special, fast case + void **newptr = static_cast<void **>(qRealloc(actualptr, newsize + sizeof(void*))); + if (!newptr) + return 0; + if (newptr == actualptr) { + // realloc succeeded without reallocating + return oldptr; + } + + *newptr = newptr; + return newptr + 1; + } + + union { void *ptr; void **pptr; quintptr n; } real, faked; + + // qMalloc returns pointers aligned at least at sizeof(size_t) boundaries + // but usually more (8- or 16-byte boundaries). + // So we overallocate by alignment-sizeof(size_t) bytes, so we're guaranteed to find a + // somewhere within the first alignment-sizeof(size_t) that is properly aligned. + + // However, we need to store the actual pointer, so we need to allocate actually size + + // alignment anyway. + + real.ptr = qRealloc(actualptr, newsize + alignment); + if (!real.ptr) + return 0; + + faked.n = real.n + alignment; + faked.n &= ~(alignment - 1); + + // now save the value of the real pointer at faked-sizeof(void*) + // by construction, alignment > sizeof(void*) and is a power of 2, so + // faked-sizeof(void*) is properly aligned for a pointer + faked.pptr[-1] = real.ptr; + + return faked.ptr; +} + +void qFreeAligned(void *ptr) +{ + if (!ptr) + return; + void **ptr2 = static_cast<void **>(ptr); + free(ptr2[-1]); +} + QT_END_NAMESPACE diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 2b62c6b..0ee9cd2 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -909,12 +909,10 @@ public: Key_Dead_Horn = 0x01001262, // multimedia/internet keys - ignored by default - see QKeyEvent c'tor - Key_Back = 0x01000061, Key_Forward = 0x01000062, Key_Stop = 0x01000063, Key_Refresh = 0x01000064, - Key_VolumeDown = 0x01000070, Key_VolumeMute = 0x01000071, Key_VolumeUp = 0x01000072, @@ -923,7 +921,6 @@ public: Key_BassDown = 0x01000075, Key_TrebleUp = 0x01000076, Key_TrebleDown = 0x01000077, - Key_MediaPlay = 0x01000080, Key_MediaStop = 0x01000081, Key_MediaPrevious = 0x01000082, @@ -932,13 +929,11 @@ public: #endif Key_MediaNext = 0x01000083, Key_MediaRecord = 0x01000084, - Key_HomePage = 0x01000090, Key_Favorites = 0x01000091, Key_Search = 0x01000092, Key_Standby = 0x01000093, Key_OpenUrl = 0x01000094, - Key_LaunchMail = 0x010000a0, Key_LaunchMedia = 0x010000a1, Key_Launch0 = 0x010000a2, @@ -957,6 +952,98 @@ public: Key_LaunchD = 0x010000af, Key_LaunchE = 0x010000b0, Key_LaunchF = 0x010000b1, + Key_MonBrightnessUp = 0x010000b2, + Key_MonBrightnessDown = 0x010000b3, + Key_KeyboardLightOnOff = 0x010000b4, + Key_KeyboardBrightnessUp = 0x010000b5, + Key_KeyboardBrightnessDown = 0x010000b6, + Key_PowerOff = 0x010000b7, + Key_WakeUp = 0x010000b8, + Key_Eject = 0x010000b9, + Key_ScreenSaver = 0x010000ba, + Key_WWW = 0x010000bb, + Key_Memo = 0x010000bc, + Key_LightBulb = 0x010000bd, + Key_Shop = 0x010000be, + Key_History = 0x010000bf, + Key_AddFavorite = 0x010000c0, + Key_HotLinks = 0x010000c1, + Key_BrightnessAdjust = 0x010000c2, + Key_Finance = 0x010000c3, + Key_Community = 0x010000c4, + Key_AudioRewind = 0x010000c5, + Key_BackForward = 0x010000c6, + Key_ApplicationLeft = 0x010000c7, + Key_ApplicationRight = 0x010000c8, + Key_Book = 0x010000c9, + Key_CD = 0x010000ca, + Key_Calculator = 0x010000cb, + Key_ToDoList = 0x010000cc, + Key_ClearGrab = 0x010000cd, + Key_Close = 0x010000ce, + Key_Copy = 0x010000cf, + Key_Cut = 0x010000d0, + Key_Display = 0x010000d1, + Key_DOS = 0x010000d2, + Key_Documents = 0x010000d3, + Key_Excel = 0x010000d4, + Key_Explorer = 0x010000d5, + Key_Game = 0x010000d6, + Key_Go = 0x010000d7, + Key_iTouch = 0x010000d8, + Key_LogOff = 0x010000d9, + Key_Market = 0x010000da, + Key_Meeting = 0x010000db, + Key_MenuKB = 0x010000dc, + Key_MenuPB = 0x010000dd, + Key_MySites = 0x010000de, + Key_News = 0x010000df, + Key_OfficeHome = 0x010000e0, + Key_Option = 0x010000e1, + Key_Paste = 0x010000e2, + Key_Phone = 0x010000e3, + Key_Calendar = 0x010000e4, + Key_Reply = 0x010000e5, + Key_Reload = 0x010000e6, + Key_RotateWindows = 0x010000e7, + Key_RotationPB = 0x010000e8, + Key_RotationKB = 0x010000e9, + Key_Save = 0x010000ea, + Key_Send = 0x010000eb, + Key_Spell = 0x010000ec, + Key_SplitScreen = 0x010000ed, + Key_Support = 0x010000ee, + Key_TaskPane = 0x010000ef, + Key_Terminal = 0x010000f0, + Key_Tools = 0x010000f1, + Key_Travel = 0x010000f2, + Key_Video = 0x010000f3, + Key_Word = 0x010000f4, + Key_Xfer = 0x010000f5, + Key_ZoomIn = 0x010000f6, + Key_ZoomOut = 0x010000f7, + Key_Away = 0x010000f8, + Key_Messenger = 0x010000f9, + Key_WebCam = 0x010000fa, + Key_MailForward = 0x010000fb, + Key_Pictures = 0x010000fc, + Key_Music = 0x010000fd, + Key_Battery = 0x010000fe, + Key_Bluetooth = 0x010000ff, + Key_WLAN = 0x01000100, + Key_UWB = 0x01000101, + Key_AudioForward = 0x01000102, + Key_AudioRepeat = 0x01000103, + Key_AudioRandomPlay = 0x01000104, + Key_Subtitle = 0x01000105, + Key_AudioCycleTrack = 0x01000106, + Key_Time = 0x01000107, + Key_Hibernate = 0x01000108, + Key_View = 0x01000109, + Key_TopMenu = 0x0100010a, + Key_PowerDown = 0x0100010b, + Key_Suspend = 0x0100010c, + Key_ContrastAdjust = 0x0100010d, Key_MediaLast = 0x0100ffff, @@ -1628,14 +1715,12 @@ public: LastGestureType = ~0u }; - enum GestureContext + enum GestureFlag { - WidgetGesture = 0, - WidgetWithChildrenGesture = 3, - - ItemGesture = WidgetGesture, - ItemWithChildrenGesture = WidgetWithChildrenGesture + DontStartGestureOnChildren = 0x01, + ReceivePartialGestures = 0x02 }; + Q_DECLARE_FLAGS(GestureFlags, GestureFlag) enum NavigationMode { @@ -1645,11 +1730,6 @@ public: NavigationModeCursorAuto, NavigationModeCursorForceVisible }; - - enum RenderHint { - QualityHint, - PerformanceHint - }; } #ifdef Q_MOC_RUN ; @@ -1670,6 +1750,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::MatchFlags) Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::TextInteractionFlags) Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::InputMethodHints) Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::TouchPointStates) +Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::GestureFlags) typedef bool (*qInternalCallback)(void **); diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 5f9d01d..5ac3675 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -1609,6 +1609,98 @@ \value Key_LaunchD \value Key_LaunchE \value Key_LaunchF + \value Key_MonBrightnessUp + \value Key_MonBrightnessDown + \value Key_KeyboardLightOnOff + \value Key_KeyboardBrightnessUp + \value Key_KeyboardBrightnessDown + \value Key_PowerOff + \value Key_WakeUp + \value Key_Eject + \value Key_ScreenSaver + \value Key_WWW + \value Key_Memo + \value Key_LightBulb + \value Key_Shop + \value Key_History + \value Key_AddFavorite + \value Key_HotLinks + \value Key_BrightnessAdjust + \value Key_Finance + \value Key_Community + \value Key_AudioRewind + \value Key_BackForward + \value Key_ApplicationLeft + \value Key_ApplicationRight + \value Key_Book + \value Key_CD + \value Key_Calculator + \value Key_ToDoList + \value Key_ClearGrab + \value Key_Close + \value Key_Copy + \value Key_Cut + \value Key_Display + \value Key_DOS + \value Key_Documents + \value Key_Excel + \value Key_Explorer + \value Key_Game + \value Key_Go + \value Key_iTouch + \value Key_LogOff + \value Key_Market + \value Key_Meeting + \value Key_MenuKB + \value Key_MenuPB + \value Key_MySites + \value Key_News + \value Key_OfficeHome + \value Key_Option + \value Key_Paste + \value Key_Phone + \value Key_Calendar + \value Key_Reply + \value Key_Reload + \value Key_RotateWindows + \value Key_RotationPB + \value Key_RotationKB + \value Key_Save + \value Key_Send + \value Key_Spell + \value Key_SplitScreen + \value Key_Support + \value Key_TaskPane + \value Key_Terminal + \value Key_Tools + \value Key_Travel + \value Key_Video + \value Key_Word + \value Key_Xfer + \value Key_ZoomIn + \value Key_ZoomOut + \value Key_Away + \value Key_Messenger + \value Key_WebCam + \value Key_MailForward + \value Key_Pictures + \value Key_Music + \value Key_Battery + \value Key_Bluetooth + \value Key_WLAN + \value Key_UWB + \value Key_AudioForward + \value Key_AudioRepeat + \value Key_AudioRandomPlay + \value Key_Subtitle + \value Key_AudioCycleTrack + \value Key_Time + \value Key_Hibernate + \value Key_View + \value Key_TopMenu + \value Key_PowerDown + \value Key_Suspend + \value Key_ContrastAdjust \value Key_MediaLast \value Key_unknown @@ -2509,7 +2601,7 @@ \value DisplayRole The key data to be rendered in the form of text. (QString) \value DecorationRole The data to be rendered as a decoration in the form - of an icon. (QColor) + of an icon. (QColor, QIcon or QPixmap) \value EditRole The data in a form suitable for editing in an editor. (QString) \value ToolTipRole The data displayed in the item's tooltip. (QString) @@ -2818,34 +2910,36 @@ \value PanGesture A Pan gesture. \value PinchGesture A Pinch gesture. \value SwipeGesture A Swipe gesture. - \value CustomGesture User-defined gesture ID. - \value LastGestureType Last user gesture ID. + \value CustomGesture A flag that can be used to test if the gesture is a + user-defined gesture ID. + \omitvalue LastGestureType User-defined gestures are registered with the - QApplication::registerGestureRecognizer() function which generates a custom gesture ID - in the range of values from CustomGesture to LastGestureType. + QGestureRecognizer::registerRecognizer() function which generates a custom + gesture ID with the Qt::CustomGesture flag set. - \sa QGesture, QWidget::grabGesture() + \sa QGesture, QWidget::grabGesture(), QGraphicsObject::grabGesture() */ /*! - \enum Qt::GestureContext + \enum Qt::GestureFlag \since 4.6 - This enum type describes the context of a gesture. + This enum type describes additional flags that can be used when subscribing + to a gesture. - For a QGesture to trigger, the gesture recognizer should filter events for - a widget tree. This enum describes for which widget the gesture recognizer - should filter events: + \value DontStartGestureOnChildren By default gestures can start on the + widget or over any of its children. Use this flag to disable this and allow + a gesture to start on the widget only. - \value WidgetGesture Gestures can only start over the widget itself. - \value WidgetWithChildrenGesture Gestures can start on the widget or over - any of its children. - \value ItemGesture Gestures can only start over the item itself. - \value ItemWithChildrenGesture Gestures can start on the item or over - any of its children. + \value ReceivePartialGestures Allows any ignored gesture events to be + propagated to parent widgets which have specified this hint. By default + only gestures that are in the Qt::GestureStarted state are propagated and + the widget always gets the full gesture sequence starting with a gesture in + the Qt::GestureStarted state and ending with a gesture in the + Qt::GestureFinished or Qt::GestureCanceled states. - \sa QWidget::grabGesture() + \sa QWidget::grabGesture(), QGraphicsObject::grabGesture() */ /*! @@ -2873,18 +2967,3 @@ \sa QApplication::setNavigationMode() \sa QApplication::navigationMode() */ - -/*! - \enum Qt::RenderHint - \since 4.6 - - This enum describes the possible hints that can be used to control various - rendering operations. - - \value QualityHint Indicates that rendering quality is the most important factor, - at the potential cost of lower performance. - - \value PerformanceHint Indicates that rendering performance is the most important factor, - at the potential cost of lower quality. -*/ - |