diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-23 22:21:50 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-23 22:21:50 (GMT) |
commit | e5722f539888913b9bea4f91db95f5e2c5fceed1 (patch) | |
tree | f1562de5cd28fa782d6285970c928972de1fb50c | |
parent | 3ac06f540761fa259317f773c8a4517e252623a3 (diff) | |
parent | 51955cb4ca94b2a700cb276714bec77bdb1bc934 (diff) | |
download | Qt-e5722f539888913b9bea4f91db95f5e2c5fceed1.zip Qt-e5722f539888913b9bea4f91db95f5e2c5fceed1.tar.gz Qt-e5722f539888913b9bea4f91db95f5e2c5fceed1.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
We need to swallow the event, otherwise it might pop up several times.
Set the item data thru the model, so we actually emit dataChanged.
There where still references to the old Assistant.
Newly created folders in QFileDialog are disabled on Cocoa.
don't remove the path from the name of included files
add some comments
remove support for QMAKE_POST_INCLUDE_FILES
remove unused function
fix prompt() stdin safety check
Improve text performance with QtWebKit in Qt 4.7
Removed support for static linking of QtWebKit.
When a drag is finished with on Mac, then it should delete itself
-rwxr-xr-x | configure | 6 | ||||
-rw-r--r-- | demos/qtdemo/qtdemo.pro | 2 | ||||
-rw-r--r-- | doc/src/platforms/compiler-notes.qdoc | 4 | ||||
-rw-r--r-- | qmake/project.cpp | 17 | ||||
-rw-r--r-- | qmake/project.h | 6 | ||||
-rw-r--r-- | src/gui/dialogs/qfiledialog_mac.mm | 18 | ||||
-rw-r--r-- | src/gui/kernel/qcocoaview_mac.mm | 2 | ||||
-rw-r--r-- | src/gui/kernel/qdnd_mac.mm | 4 | ||||
-rw-r--r-- | src/gui/text/qfontengine_mac.mm | 24 | ||||
-rw-r--r-- | tools/assistant/tools/assistant/bookmarkdialog.cpp | 3 | ||||
-rw-r--r-- | tools/assistant/tools/assistant/bookmarkmanager.cpp | 1 | ||||
-rw-r--r-- | tools/assistant/tools/assistant/bookmarkmodel.cpp | 8 | ||||
-rw-r--r-- | tools/assistant/tools/assistant/bookmarkmodel.h | 1 | ||||
-rw-r--r-- | tools/configure/configureapp.cpp | 5 |
14 files changed, 68 insertions, 33 deletions
@@ -6937,6 +6937,12 @@ if [ "$CFG_GUI" = "no" ]; then canBuildWebKit="no" fi +if [ "$CFG_SHARED" = "no" ]; then + echo + echo "WARNING: Using static linking will disable the WebKit module." + echo + canBuildWebKit="no" +fi CFG_CONCURRENT="yes" if [ "$canBuildQtConcurrent" = "no" ]; then diff --git a/demos/qtdemo/qtdemo.pro b/demos/qtdemo/qtdemo.pro index 4d4177e..61ea376 100644 --- a/demos/qtdemo/qtdemo.pro +++ b/demos/qtdemo/qtdemo.pro @@ -1,4 +1,4 @@ -CONFIG += assistant help x11inc +CONFIG += help x11inc TARGET = qtdemo DEMO_DESTDIR = $$QT_BUILD_TREE isEmpty(DEMO_DESTDIR):DEMO_DESTDIR=../.. diff --git a/doc/src/platforms/compiler-notes.qdoc b/doc/src/platforms/compiler-notes.qdoc index c365d88..7eb92e0 100644 --- a/doc/src/platforms/compiler-notes.qdoc +++ b/doc/src/platforms/compiler-notes.qdoc @@ -52,7 +52,7 @@ \table \header \o Compiler \o{5,1} Features - \header \o \o Concurrent \o XmlPatterns \o WebKit \o CLucene \o Phonon + \header \o \o Concurrent \o XmlPatterns \o WebKit(*) \o CLucene \o Phonon \row \o g++ 3.3 \o \o \bold{X} \o \o \bold{X} \o \bold{X} \row \o g++ 3.4 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \row @@ -67,6 +67,8 @@ \row \o MSVC 2005 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \endtable + * WebKit is only supported as a dynamically built library. Static linkage is not supported. + \target GCC \section1 GCC diff --git a/qmake/project.cpp b/qmake/project.cpp index 9cf6a6f..cb02923 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -1406,16 +1406,6 @@ QMakeProject::read(uchar cmd) return false; } - if(cmd & ReadPostFiles) { // parse post files - const QStringList l = vars["QMAKE_POST_INCLUDE_FILES"]; - for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { - if(read((*it), vars)) { - if(vars["QMAKE_INTERNAL_INCLUDED_FILES"].indexOf((*it)) == -1) - vars["QMAKE_INTERNAL_INCLUDED_FILES"].append((*it)); - } - } - } - if(cmd & ReadCmdLine) { parser.file = "(internal)"; parser.from_file = false; @@ -1720,7 +1710,6 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QMap<QString, QStringL fprintf(stderr, "Cannot find directory: %s\n", file.left(di).toLatin1().constData()); return IncludeFailure; } - file = file.right(file.length() - di - 1); } bool parsed = false; parser_info pi = parser; @@ -1740,9 +1729,9 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QMap<QString, QStringL if(proj.doProjectInclude("default_pre", IncludeFlagFeature, proj.variables()) == IncludeNoExist) proj.doProjectInclude("default", IncludeFlagFeature, proj.variables()); #endif - parsed = proj.read(file, proj.variables()); + parsed = proj.read(file, proj.variables()); // parse just that file (fromfile, infile) } else { - parsed = proj.read(file); + parsed = proj.read(file); // parse all aux files (load/include into) } place = proj.variables(); } else { @@ -2191,7 +2180,7 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list, if(args.count() != 1) { fprintf(stderr, "%s:%d prompt(question) requires one argument.\n", parser.file.toLatin1().constData(), parser.line_no); - } else if(projectFile() == "-") { + } else if(pfile == "-") { fprintf(stderr, "%s:%d prompt(question) cannot be used when '-o -' is used.\n", parser.file.toLatin1().constData(), parser.line_no); } else { diff --git a/qmake/project.h b/qmake/project.h index fd8ced1..1d9ec04 100644 --- a/qmake/project.h +++ b/qmake/project.h @@ -118,7 +118,7 @@ public: ~QMakeProject(); enum { ReadCache=0x01, ReadConf=0x02, ReadCmdLine=0x04, ReadProFile=0x08, - ReadPostFiles=0x10, ReadFeatures=0x20, ReadConfigs=0x40, ReadAll=0xFF }; + ReadFeatures=0x20, ReadConfigs=0x40, ReadAll=0xFF }; inline bool parse(const QString &text) { return parse(text, vars); } bool read(const QString &project, uchar cmd=ReadAll); bool read(uchar cmd=ReadAll); @@ -127,7 +127,6 @@ public: QStringList userTestFunctions() { return testFunctions.keys(); } QString projectFile(); - QString configFile(); inline QMakeProperty *properties() { return prop; } bool doProjectTest(QString str, QMap<QString, QStringList> &place); @@ -174,9 +173,6 @@ inline QString QMakeProject::projectFile() return pfile; } -inline QString QMakeProject::configFile() -{ return cfile; } - inline QStringList &QMakeProject::values(const QString &v) { return values(v, vars); } diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm index b07b1ea..f1afaa9 100644 --- a/src/gui/dialogs/qfiledialog_mac.mm +++ b/src/gui/dialogs/qfiledialog_mac.mm @@ -284,6 +284,15 @@ QT_USE_NAMESPACE if ([filename length] == 0) return NO; + // Always accept directories regardless of their names (unless it is a bundle): + BOOL isDir; + if ([[NSFileManager defaultManager] fileExistsAtPath:filename isDirectory:&isDir] && isDir) { + if ([mSavePanel treatsFilePackagesAsDirectories] == NO) { + if ([[NSWorkspace sharedWorkspace] isFilePackageAtPath:filename] == NO) + return YES; + } + } + QString qtFileName = QT_PREPEND_NAMESPACE(qt_mac_NSStringToQString)(filename); QFileInfo info(qtFileName.normalized(QT_PREPEND_NAMESPACE(QString::NormalizationForm_C))); QString path = info.absolutePath(); @@ -295,15 +304,6 @@ QT_USE_NAMESPACE if (!mQDirFilterEntryList->contains(info.fileName())) return NO; - // Always accept directories regardless of their names (unless it is a bundle): - BOOL isDir; - if ([[NSFileManager defaultManager] fileExistsAtPath:filename isDirectory:&isDir] && isDir) { - if ([mSavePanel treatsFilePackagesAsDirectories] == NO) { - if ([[NSWorkspace sharedWorkspace] isFilePackageAtPath:filename] == NO) - return YES; - } - } - // No filter means accept everything if (mSelectedNameFilter->isEmpty()) return YES; diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index eec9699..5c90e2e 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -1587,6 +1587,8 @@ Qt::DropAction QDragManager::drag(QDrag *o) } } } + o->setMimeData(0); + o->deleteLater(); return performedAction; } diff --git a/src/gui/kernel/qdnd_mac.mm b/src/gui/kernel/qdnd_mac.mm index 189d535..844f5e3 100644 --- a/src/gui/kernel/qdnd_mac.mm +++ b/src/gui/kernel/qdnd_mac.mm @@ -675,6 +675,8 @@ Qt::DropAction QDragManager::drag(QDrag *o) } if (atleastOne){ DisposeDrag(dragRef); + o->setMimeData(0); + o->deleteLater(); return action; } } @@ -682,6 +684,8 @@ Qt::DropAction QDragManager::drag(QDrag *o) DragActions ret = kDragActionNothing; GetDragDropAction(dragRef, &ret); DisposeDrag(dragRef); //cleanup + o->setMimeData(0); + o->deleteLater(); return qt_mac_dnd_map_mac_default_action(ret); } DisposeDrag(dragRef); //cleanup diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm index 7ceed61..deaad57 100644 --- a/src/gui/text/qfontengine_mac.mm +++ b/src/gui/text/qfontengine_mac.mm @@ -348,7 +348,29 @@ bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLay bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, QTextEngine::ShaperFlags flags) const { - return stringToCMap(str, len, glyphs, nglyphs, flags, 0, 0); + *nglyphs = len; + QVarLengthArray<CGGlyph> cgGlyphs(len); + CTFontGetGlyphsForCharacters(ctfont, (const UniChar*)str, cgGlyphs.data(), len); + + for (int i = 0; i < len; ++i) + glyphs->glyphs[i] = cgGlyphs[i]; + + if (flags & QTextEngine::GlyphIndicesOnly) + return true; + + QVarLengthArray<CGSize> advances(len); + CTFontGetAdvancesForGlyphs(ctfont, kCTFontHorizontalOrientation, cgGlyphs.data(), advances.data(), len); + + for (int i = 0; i < len; ++i) { + glyphs->advances_x[i] = QFixed::fromReal(advances[i].width); + glyphs->advances_y[i] = QFixed::fromReal(advances[i].height); + if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) { + glyphs->advances_x[i] = glyphs->advances_x[i].round(); + glyphs->advances_y[i] = glyphs->advances_y[i].round(); + } + } + + return true; } void QCoreTextFontEngineMulti::recalcAdvances(int , QGlyphLayout *, QTextEngine::ShaperFlags) const diff --git a/tools/assistant/tools/assistant/bookmarkdialog.cpp b/tools/assistant/tools/assistant/bookmarkdialog.cpp index 8b195c1..d9e9a53 100644 --- a/tools/assistant/tools/assistant/bookmarkdialog.cpp +++ b/tools/assistant/tools/assistant/bookmarkdialog.cpp @@ -160,8 +160,7 @@ void BookmarkDialog::accepted() QModelIndex index = ui.treeView->currentIndex(); if (index.isValid()) { index = bookmarkModel->addItem(bookmarkTreeModel->mapToSource(index)); - if (BookmarkItem *item = bookmarkModel->itemFromIndex(index)) - item->setData(DataVector() << m_title << m_url << false); + bookmarkModel->setData(index, DataVector() << m_title << m_url << false); } else rejected(); diff --git a/tools/assistant/tools/assistant/bookmarkmanager.cpp b/tools/assistant/tools/assistant/bookmarkmanager.cpp index 4bc7027..23632b1 100644 --- a/tools/assistant/tools/assistant/bookmarkmanager.cpp +++ b/tools/assistant/tools/assistant/bookmarkmanager.cpp @@ -240,6 +240,7 @@ bool BookmarkManager::eventFilter(QObject *object, QEvent *event) case Qt::Key_Delete: { removeItem(bookmarkTreeView->currentIndex()); + return true; } break; case Qt::Key_Up: { // needs event filter on widget diff --git a/tools/assistant/tools/assistant/bookmarkmodel.cpp b/tools/assistant/tools/assistant/bookmarkmodel.cpp index e446ff0..4c30b42 100644 --- a/tools/assistant/tools/assistant/bookmarkmodel.cpp +++ b/tools/assistant/tools/assistant/bookmarkmodel.cpp @@ -261,6 +261,14 @@ BookmarkModel::data(const QModelIndex &index, int role) const return QVariant(); } +void BookmarkModel::setData(const QModelIndex &index, const DataVector &data) +{ + if (BookmarkItem *item = itemFromIndex(index)) { + item->setData(data); + emit dataChanged(index, index); + } +} + bool BookmarkModel::setData(const QModelIndex &index, const QVariant &value, int role) { diff --git a/tools/assistant/tools/assistant/bookmarkmodel.h b/tools/assistant/tools/assistant/bookmarkmodel.h index 6469258..f74baea 100644 --- a/tools/assistant/tools/assistant/bookmarkmodel.h +++ b/tools/assistant/tools/assistant/bookmarkmodel.h @@ -79,6 +79,7 @@ public: Qt::ItemFlags flags(const QModelIndex &index) const; QVariant data(const QModelIndex &index, int role) const; + void setData(const QModelIndex &index, const QVector<QVariant> &data); bool setData(const QModelIndex &index, const QVariant &value, int role); QVariant headerData(int section, Qt::Orientation orientation, int role) const; diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 2e2d8ba..c66eb53 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2125,6 +2125,11 @@ bool Configure::checkAvailability(const QString &part) available = true; } else if (part == "WEBKIT") { available = (dictionary.value("QMAKESPEC") == "win32-msvc2005") || (dictionary.value("QMAKESPEC") == "win32-msvc2008") || (dictionary.value("QMAKESPEC") == "win32-msvc2010") || (dictionary.value("QMAKESPEC") == "win32-g++"); + if( dictionary[ "SHARED" ] == "no" ) { + cout << endl << "WARNING: Using static linking will disable the WebKit module." << endl + << endl; + available = false; + } } else if (part == "AUDIO_BACKEND") { available = true; if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { |