summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-23 22:21:50 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-23 22:21:50 (GMT)
commite5722f539888913b9bea4f91db95f5e2c5fceed1 (patch)
treef1562de5cd28fa782d6285970c928972de1fb50c /src
parent3ac06f540761fa259317f773c8a4517e252623a3 (diff)
parent51955cb4ca94b2a700cb276714bec77bdb1bc934 (diff)
downloadQt-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
Diffstat (limited to 'src')
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm18
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm2
-rw-r--r--src/gui/kernel/qdnd_mac.mm4
-rw-r--r--src/gui/text/qfontengine_mac.mm24
4 files changed, 38 insertions, 10 deletions
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