From 97c5d38465040618e187f6de3f520873ad867de8 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Tue, 22 May 2012 16:07:16 +0200 Subject: [PATCH 1/2] On linux isAbsourd point is incompatible with multiple desktop. Event a point on a desktop could be intended as absould because of the point is checked against the screen position. This leads to a lot of errors when screens are positionned differently than 'standard' position. According to the comment this is used only on mac. --- src/board/UBBoardView.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/board/UBBoardView.cpp b/src/board/UBBoardView.cpp index 9fa69084..670f0ed8 100644 --- a/src/board/UBBoardView.cpp +++ b/src/board/UBBoardView.cpp @@ -940,19 +940,21 @@ void UBBoardView::virtualKeyboardActivated(bool b) // Apple remote desktop sends funny events when the transmission is bad -bool -UBBoardView::isAbsurdPoint (QPoint point) +bool UBBoardView::isAbsurdPoint(QPoint point) { - QDesktopWidget *desktop = qApp->desktop (); +#ifdef Q_WS_MACX + QDesktopWidget *desktop = qApp->desktop(); bool isValidPoint = false; - for (int i = 0; i < desktop->numScreens (); i++) - { - QRect screenRect = desktop->screenGeometry (i); - isValidPoint = isValidPoint || screenRect.contains (point); + for (int i = 0; i < desktop->numScreens() && !isValidPoint; i++){ + QRect screenRect = desktop->screenGeometry(i); + screenRect=QRect(QPoint(0,0),screenRect.size()); + isValidPoint = isValidPoint || screenRect.contains(point); } - return !isValidPoint; +#else + return false; +#endif } void From 41f088d5f634177a6271164605f8eed2a881b919 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Tue, 22 May 2012 16:09:34 +0200 Subject: [PATCH 2/2] fixed language error --- src/frameworks/UBPlatformUtils_linux.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frameworks/UBPlatformUtils_linux.cpp b/src/frameworks/UBPlatformUtils_linux.cpp index 8997a0f5..174e3694 100644 --- a/src/frameworks/UBPlatformUtils_linux.cpp +++ b/src/frameworks/UBPlatformUtils_linux.cpp @@ -63,7 +63,7 @@ QString UBPlatformUtils::preferredTranslation(QString pFilePrefix) QString UBPlatformUtils::preferredLanguage() { - return "fr";//QLocale::system().name(); + return QLocale::system().name(); } void UBPlatformUtils::runInstaller(const QString &installerFilePath)