summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm8
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.cpp1
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.cpp12
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.h1
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp16
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.cpp2
7 files changed, 25 insertions, 17 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
index 1e9acd79ed..7093d27efe 100644
--- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
@@ -211,7 +211,7 @@ static QString strippedText(QString s)
- (void)closePanel
{
- *mCurrentSelection = QT_PREPEND_NAMESPACE(QCFString::toQString)([[mSavePanel URL] path]);
+ *mCurrentSelection = QT_PREPEND_NAMESPACE(QCFString::toQString)([[mSavePanel URL] path]).normalized(QString::NormalizationForm_C);
if ([mSavePanel respondsToSelector:@selector(close)])
[mSavePanel close];
if ([mSavePanel isSheet])
@@ -376,11 +376,11 @@ static QString strippedText(QString s)
QStringList result;
NSArray* array = [mOpenPanel URLs];
for (NSUInteger i=0; i<[array count]; ++i)
- result << QCFString::toQString([[array objectAtIndex:i] path]);
+ result << QCFString::toQString([[array objectAtIndex:i] path]).normalized(QString::NormalizationForm_C);
return result;
} else {
QStringList result;
- QString filename = QT_PREPEND_NAMESPACE(QCFString::toQString)([[mSavePanel URL] path]);
+ QString filename = QT_PREPEND_NAMESPACE(QCFString::toQString)([[mSavePanel URL] path]).normalized(QString::NormalizationForm_C);
result << filename.remove(QLatin1String("___qt_very_unlikely_prefix_"));
return result;
}
@@ -586,7 +586,7 @@ QString QCocoaFileDialogHelper::directory() const
{
QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
if (delegate)
- return QCFString::toQString([[delegate->mSavePanel directoryURL] path]);
+ return QCFString::toQString([[delegate->mSavePanel directoryURL] path]).normalized(QString::NormalizationForm_C);
return QString();
}
diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp
index 59e7ce1526..2b10a26c88 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.cpp
+++ b/src/plugins/platforms/qnx/qqnxintegration.cpp
@@ -507,6 +507,7 @@ void QQnxIntegration::createDisplay(screen_display_t display, bool isPrimary)
QQnxScreen *screen = new QQnxScreen(m_screenContext, display, isPrimary);
m_screens.append(screen);
screenAdded(screen);
+ screen->adjustOrientation();
QObject::connect(m_screenEventHandler, SIGNAL(newWindowCreated(void*)),
screen, SLOT(newWindowCreated(void*)));
diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp
index 7614abdc6a..2b81559ab6 100644
--- a/src/plugins/platforms/qnx/qqnxscreen.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreen.cpp
@@ -498,6 +498,18 @@ void QQnxScreen::onWindowPost(QQnxWindow *window)
}
}
+void QQnxScreen::adjustOrientation()
+{
+ if (!m_primaryScreen)
+ return;
+
+ bool ok = false;
+ const int rotation = qgetenv("ORIENTATION").toInt(&ok);
+
+ if (ok)
+ setRotation(rotation);
+}
+
QPlatformCursor * QQnxScreen::cursor() const
{
return m_cursor;
diff --git a/src/plugins/platforms/qnx/qqnxscreen.h b/src/plugins/platforms/qnx/qqnxscreen.h
index 41dc675599..98f2a90fbc 100644
--- a/src/plugins/platforms/qnx/qqnxscreen.h
+++ b/src/plugins/platforms/qnx/qqnxscreen.h
@@ -92,6 +92,7 @@ public:
void updateHierarchy();
void onWindowPost(QQnxWindow *window);
+ void adjustOrientation();
QSharedPointer<QQnxRootWindow> rootWindow() const;
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index 545484de8d..3f4555a31f 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -271,22 +271,19 @@ QWindowsContextPrivate::QWindowsContextPrivate() :
m_eventType(QByteArrayLiteral("windows_generic_MSG")),
m_lastActiveWindow(0), m_asyncExpose(0)
{
+ const QSysInfo::WinVersion ver = QSysInfo::windowsVersion();
#ifndef Q_OS_WINCE
QWindowsContext::user32dll.init();
QWindowsContext::shell32dll.init();
-#endif
// Ensure metrics functions report correct data, QTBUG-30063.
if (QWindowsContext::user32dll.setProcessDPIAware)
QWindowsContext::user32dll.setProcessDPIAware();
- m_displayContext = GetDC(0);
- m_defaultDPI = GetDeviceCaps(m_displayContext, LOGPIXELSY);
- const QSysInfo::WinVersion ver = QSysInfo::windowsVersion();
-#ifndef Q_OS_WINCE
if (hasTouchSupport(ver) && QWindowsContext::user32dll.initTouch())
m_systemInfo |= QWindowsContext::SI_SupportsTouch;
-#endif
-
+#endif // !Q_OS_WINCE
+ m_displayContext = GetDC(0);
+ m_defaultDPI = GetDeviceCaps(m_displayContext, LOGPIXELSY);
if (useRTL_Extensions(ver)) {
m_systemInfo |= QWindowsContext::SI_RTL_Extensions;
m_keyMapper.setUseRTLExtensions(true);
@@ -417,10 +414,7 @@ QString QWindowsContext::registerWindowClass(const QWindow *w, bool isGL)
if (icon)
cname += QStringLiteral("Icon");
- HBRUSH brush = 0;
- if (!isGL)
- brush = GetSysColorBrush(COLOR_WINDOW);
- return registerWindowClass(cname, qWindowsWndProc, style, brush, icon);
+ return registerWindowClass(cname, qWindowsWndProc, style, GetSysColorBrush(COLOR_WINDOW), icon);
}
QString QWindowsContext::registerWindowClass(QString cname,
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
index 98b4e7af62..7f97d58be4 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
@@ -285,7 +285,7 @@ static bool addFontToDatabase(const QString &familyName, uchar charSet,
return false;
if (!QDir::isAbsolutePath(value))
- value.prepend(QString::fromLocal8Bit(qgetenv("windir") + "\\Fonts\\"));
+ value.prepend(QFile::decodeName(qgetenv("windir") + "\\Fonts\\"));
QPlatformFontDatabase::registerFont(faceName, QString(), foundryName, weight, style, stretch,
antialias, scalable, size, fixed, writingSystems, createFontFile(value, index));
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp
index c402f00453..5757bcad4e 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp
@@ -190,7 +190,7 @@ void QWindowsFontEngine::getCMap()
unitsPerEm = otm->otmEMSquare;
x_height = (int)otm->otmsXHeight;
loadKerningPairs(designToDevice);
- _faceId.filename = QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpFullName)).toLatin1();
+ _faceId.filename = QFile::encodeName(QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpFullName)));
lineWidth = otm->otmsUnderscoreSize;
fsType = otm->otmfsType;
free(otm);