diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-06-24 04:21:58 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-06-24 04:21:58 (GMT) |
commit | 736067120b466248cbfc3180a533dc416953c5e0 (patch) | |
tree | 8d169e62a1011bdb8fe3b05a6c3629b2a78e3048 /src | |
parent | 9d6ccfea89ae99b747f70ece71185868f189d0f9 (diff) | |
parent | 5d64484bf0b37427133c163ad9b160e767dc1bcd (diff) | |
download | Qt-736067120b466248cbfc3180a533dc416953c5e0.zip Qt-736067120b466248cbfc3180a533dc416953c5e0.tar.gz Qt-736067120b466248cbfc3180a533dc416953c5e0.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/declarative/declarative.pro | 1 | ||||
-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-- | src/imports/folderlistmodel/folderlistmodel.pro | 1 | ||||
-rw-r--r-- | src/imports/gestures/gestures.pro | 1 | ||||
-rw-r--r-- | src/imports/particles/particles.pro | 1 |
8 files changed, 42 insertions, 10 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/declarative.pro b/src/3rdparty/webkit/WebKit/qt/declarative/declarative.pro index 122d90a..1371e57 100644 --- a/src/3rdparty/webkit/WebKit/qt/declarative/declarative.pro +++ b/src/3rdparty/webkit/WebKit/qt/declarative/declarative.pro @@ -64,6 +64,7 @@ qmldir.files += $$PWD/qmldir qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH symbian:{ + TARGET.UID3 = 0x20021321 load(data_caging_paths) include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) 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/src/imports/folderlistmodel/folderlistmodel.pro b/src/imports/folderlistmodel/folderlistmodel.pro index dced319..49a6baa 100644 --- a/src/imports/folderlistmodel/folderlistmodel.pro +++ b/src/imports/folderlistmodel/folderlistmodel.pro @@ -14,6 +14,7 @@ qmldir.files += $$PWD/qmldir qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH symbian:{ + TARGET.UID3 = 0x20021320 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) importFiles.sources = qmlfolderlistmodelplugin.dll qmldir diff --git a/src/imports/gestures/gestures.pro b/src/imports/gestures/gestures.pro index d6dc758..265bbca 100644 --- a/src/imports/gestures/gestures.pro +++ b/src/imports/gestures/gestures.pro @@ -14,6 +14,7 @@ qmldir.files += $$PWD/qmldir qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH symbian:{ + TARGET.UID3 = 0x2002131F include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) importFiles.sources = qmlgesturesplugin.dll qmldir diff --git a/src/imports/particles/particles.pro b/src/imports/particles/particles.pro index 95ec633..91c1b9f 100644 --- a/src/imports/particles/particles.pro +++ b/src/imports/particles/particles.pro @@ -18,6 +18,7 @@ qmldir.files += $$PWD/qmldir qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH symbian:{ + TARGET.UID3 = 0x2002131E include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) importFiles.sources = qmlparticlesplugin.dll qmldir |