Commit bedf11cc authored by Craig Watson's avatar Craig Watson

Updated Q_WS_* env variables.

Q_WS_MACX -> Q_OS_OSX
Q_WS_MAC -> Q_OS_OSX
Q_WS_WIN -> Q_OS_WIN
Q_WS_X11 -> Q_OS_LINUX
parent 55dd0450
...@@ -2140,7 +2140,7 @@ void UBSvgSubsetAdaptor::UBSvgSubsetReader::graphicsItemFromSvg(QGraphicsItem* g ...@@ -2140,7 +2140,7 @@ void UBSvgSubsetAdaptor::UBSvgSubsetReader::graphicsItemFromSvg(QGraphicsItem* g
{ {
if (!svgX.isNull() && !svgY.isNull()) if (!svgX.isNull() && !svgY.isNull())
{ {
#ifdef Q_WS_WIN #ifdef Q_OS_WIN
gItem->setPos(svgX.toString().toFloat(), svgY.toString().toFloat()); gItem->setPos(svgX.toString().toFloat(), svgY.toString().toFloat());
#endif #endif
} }
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
#include "core/memcheck.h" #include "core/memcheck.h"
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
#include <QProcess> #include <QProcess>
bool onboardIsAlreadyRunning = true; bool onboardIsAlreadyRunning = true;
#endif #endif
...@@ -165,7 +165,7 @@ void UBBoardController::init() ...@@ -165,7 +165,7 @@ void UBBoardController::init()
UBBoardController::~UBBoardController() UBBoardController::~UBBoardController()
{ {
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
if(!onboardIsAlreadyRunning){ if(!onboardIsAlreadyRunning){
QProcess newProcess; QProcess newProcess;
newProcess.startDetached("killall onboard"); newProcess.startDetached("killall onboard");
...@@ -828,7 +828,7 @@ void UBBoardController::showKeyboard(bool show) ...@@ -828,7 +828,7 @@ void UBBoardController::showKeyboard(bool show)
if(show) if(show)
UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector); UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector);
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
static bool isFirstTime = true; static bool isFirstTime = true;
if(isFirstTime){ if(isFirstTime){
QProcess isAlreadyRunningProcess; QProcess isAlreadyRunningProcess;
...@@ -2411,7 +2411,7 @@ void UBBoardController::processMimeData(const QMimeData* pMimeData, const QPoint ...@@ -2411,7 +2411,7 @@ void UBBoardController::processMimeData(const QMimeData* pMimeData, const QPoint
} }
} }
else{ else{
#ifdef Q_WS_MACX #ifdef Q_OS_OSX
// With Safari, in 95% of the drops, the mime datas are hidden in Apple Web Archive pasteboard type. // With Safari, in 95% of the drops, the mime datas are hidden in Apple Web Archive pasteboard type.
// This is due to the way Safari is working so we have to dig into the pasteboard in order to retrieve // This is due to the way Safari is working so we have to dig into the pasteboard in order to retrieve
// the data. // the data.
......
...@@ -225,7 +225,7 @@ void UBBoardPaletteManager::setupPalettes() ...@@ -225,7 +225,7 @@ void UBBoardPaletteManager::setupPalettes()
if (UBPlatformUtils::hasVirtualKeyboard()) if (UBPlatformUtils::hasVirtualKeyboard())
{ {
mKeyboardPalette = new UBKeyboardPalette(0); mKeyboardPalette = new UBKeyboardPalette(0);
#ifndef Q_WS_WIN #ifndef Q_OS_WIN
connect(mKeyboardPalette, SIGNAL(closed()), mKeyboardPalette, SLOT(onDeactivated())); connect(mKeyboardPalette, SIGNAL(closed()), mKeyboardPalette, SLOT(onDeactivated()));
#endif #endif
} }
...@@ -677,7 +677,7 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is ...@@ -677,7 +677,7 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
mLeftPalette->setVisible(leftPaletteVisible); mLeftPalette->setVisible(leftPaletteVisible);
mRightPalette->setVisible(rightPaletteVisible); mRightPalette->setVisible(rightPaletteVisible);
#ifdef Q_WS_WIN #ifdef Q_OS_WIN
if (rightPaletteVisible) if (rightPaletteVisible)
mRightPalette->setAdditionalVOffset(0); mRightPalette->setAdditionalVOffset(0);
#endif #endif
...@@ -702,24 +702,24 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is ...@@ -702,24 +702,24 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
if(mKeyboardPalette->m_isVisible) if(mKeyboardPalette->m_isVisible)
{ {
mKeyboardPalette->hide(); mKeyboardPalette->hide();
#ifndef Q_WS_X11 #ifndef Q_OS_LINUX
mKeyboardPalette->setParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); mKeyboardPalette->setParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView());
#else #else
mKeyboardPalette->setParent(0); mKeyboardPalette->setParent(0);
#endif #endif
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
mKeyboardPalette->setWindowFlags(Qt::Dialog | Qt::Popup | Qt::FramelessWindowHint); mKeyboardPalette->setWindowFlags(Qt::Dialog | Qt::Popup | Qt::FramelessWindowHint);
#endif #endif
mKeyboardPalette->show(); mKeyboardPalette->show();
} }
else else
// In linux keyboard in desktop mode have to allways be with null parent // In linux keyboard in desktop mode have to allways be with null parent
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
mKeyboardPalette->setParent(0); mKeyboardPalette->setParent(0);
#else #else
mKeyboardPalette->setParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); mKeyboardPalette->setParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView());
#endif //Q_WS_X11 #endif //Q_OS_LINUX
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
mKeyboardPalette->setWindowFlags(Qt::Dialog | Qt::Popup | Qt::FramelessWindowHint); mKeyboardPalette->setWindowFlags(Qt::Dialog | Qt::Popup | Qt::FramelessWindowHint);
#endif #endif
...@@ -727,7 +727,7 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is ...@@ -727,7 +727,7 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
mLeftPalette->setVisible(leftPaletteVisible); mLeftPalette->setVisible(leftPaletteVisible);
mRightPalette->setVisible(rightPaletteVisible); mRightPalette->setVisible(rightPaletteVisible);
#ifdef Q_WS_WIN #ifdef Q_OS_WIN
if (rightPaletteVisible && UBSettings::settings()->appToolBarPositionedAtTop->get().toBool()) if (rightPaletteVisible && UBSettings::settings()->appToolBarPositionedAtTop->get().toBool())
mRightPalette->setAdditionalVOffset(30); mRightPalette->setAdditionalVOffset(30);
#endif #endif
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
#include "board/UBBoardController.h" #include "board/UBBoardController.h"
#include "board/UBBoardPaletteManager.h" #include "board/UBBoardPaletteManager.h"
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
#include "core/UBApplicationController.h" #include "core/UBApplicationController.h"
#include "desktop/UBDesktopAnnotationController.h" #include "desktop/UBDesktopAnnotationController.h"
#endif #endif
...@@ -366,7 +366,7 @@ void UBBoardView::tabletEvent (QTabletEvent * event) ...@@ -366,7 +366,7 @@ void UBBoardView::tabletEvent (QTabletEvent * event)
} }
bool acceptEvent = true; bool acceptEvent = true;
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
//Work around #1388. After selecting annotation tool in desktop mode, annotation view appears on top when //Work around #1388. After selecting annotation tool in desktop mode, annotation view appears on top when
//using Mac OS X. In this case tablet event should send mouse event so as to let user interact with //using Mac OS X. In this case tablet event should send mouse event so as to let user interact with
//stylus palette. //stylus palette.
...@@ -865,7 +865,7 @@ void UBBoardView::setMultiselection(bool enable) ...@@ -865,7 +865,7 @@ void UBBoardView::setMultiselection(bool enable)
} }
// work around for handling tablet events on MAC OS with Qt 4.8.0 and above // work around for handling tablet events on MAC OS with Qt 4.8.0 and above
#if defined(Q_WS_MACX) #if defined(Q_OS_OSX)
bool UBBoardView::directTabletEvent(QEvent *event) bool UBBoardView::directTabletEvent(QEvent *event)
{ {
QTabletEvent *tEvent = static_cast<QTabletEvent *>(event); QTabletEvent *tEvent = static_cast<QTabletEvent *>(event);
......
...@@ -63,7 +63,7 @@ public: ...@@ -63,7 +63,7 @@ public:
void setMultiselection(bool enable); void setMultiselection(bool enable);
bool isMultipleSelectionEnabled() { return mMultipleSelectionIsEnabled; } bool isMultipleSelectionEnabled() { return mMultipleSelectionIsEnabled; }
// work around for handling tablet events on MAC OS with Qt 4.8.0 and above // work around for handling tablet events on MAC OS with Qt 4.8.0 and above
#if defined(Q_WS_MACX) #if defined(Q_OS_OSX)
bool directTabletEvent(QEvent *event); bool directTabletEvent(QEvent *event);
QWidget *widgetForTabletEvent(QWidget *w, const QPoint &pos); QWidget *widgetForTabletEvent(QWidget *w, const QPoint &pos);
#endif #endif
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include <QFontDatabase> #include <QFontDatabase>
#include <QStyleFactory> #include <QStyleFactory>
#if defined(Q_WS_MACX) #if defined(Q_OS_OSX)
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>
#endif #endif
...@@ -85,13 +85,13 @@ const QString UBApplication::mimeTypeUniboardPage = QString("application/vnd.mne ...@@ -85,13 +85,13 @@ const QString UBApplication::mimeTypeUniboardPage = QString("application/vnd.mne
const QString UBApplication::mimeTypeUniboardPageItem = QString("application/vnd.mnemis-uniboard-page-item"); const QString UBApplication::mimeTypeUniboardPageItem = QString("application/vnd.mnemis-uniboard-page-item");
const QString UBApplication::mimeTypeUniboardPageThumbnail = QString("application/vnd.mnemis-uniboard-thumbnail"); const QString UBApplication::mimeTypeUniboardPageThumbnail = QString("application/vnd.mnemis-uniboard-thumbnail");
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
bool bIsMinimized = false; bool bIsMinimized = false;
#endif #endif
QObject* UBApplication::staticMemoryCleaner = 0; QObject* UBApplication::staticMemoryCleaner = 0;
#if defined(Q_WS_MAC) #if defined(Q_OS_OSX)
static OSStatus ub_appleEventProcessor(const AppleEvent *ae, AppleEvent *event, long handlerRefCon) static OSStatus ub_appleEventProcessor(const AppleEvent *ae, AppleEvent *event, long handlerRefCon)
{ {
Q_UNUSED(event); Q_UNUSED(event);
...@@ -154,7 +154,7 @@ UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSing ...@@ -154,7 +154,7 @@ UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSing
connect(settings->appToolBarDisplayText, SIGNAL(changed(QVariant)), this, SLOT(toolBarDisplayTextChanged(QVariant))); connect(settings->appToolBarDisplayText, SIGNAL(changed(QVariant)), this, SLOT(toolBarDisplayTextChanged(QVariant)));
updateProtoActionsState(); updateProtoActionsState();
#ifndef Q_WS_MAC #ifndef Q_OS_OSX
setWindowIcon(QIcon(":/images/OpenBoard.png")); setWindowIcon(QIcon(":/images/OpenBoard.png"));
#endif #endif
...@@ -338,7 +338,7 @@ int UBApplication::exec(const QString& pFileToImport) ...@@ -338,7 +338,7 @@ int UBApplication::exec(const QString& pFileToImport)
connect(mainWindow->actionDesktop, SIGNAL(triggered(bool)), applicationController, SLOT(showDesktop(bool))); connect(mainWindow->actionDesktop, SIGNAL(triggered(bool)), applicationController, SLOT(showDesktop(bool)));
connect(mainWindow->actionDesktop, SIGNAL(triggered(bool)), this, SLOT(stopScript())); connect(mainWindow->actionDesktop, SIGNAL(triggered(bool)), this, SLOT(stopScript()));
#ifndef Q_WS_MAC #ifndef Q_OS_OSX
connect(mainWindow->actionHideApplication, SIGNAL(triggered()), mainWindow, SLOT(showMinimized())); connect(mainWindow->actionHideApplication, SIGNAL(triggered()), mainWindow, SLOT(showMinimized()));
#else #else
connect(mainWindow->actionHideApplication, SIGNAL(triggered()), this, SLOT(showMinimized())); connect(mainWindow->actionHideApplication, SIGNAL(triggered()), this, SLOT(showMinimized()));
...@@ -368,7 +368,7 @@ int UBApplication::exec(const QString& pFileToImport) ...@@ -368,7 +368,7 @@ int UBApplication::exec(const QString& pFileToImport)
if (pFileToImport.length() > 0) if (pFileToImport.length() > 0)
UBApplication::applicationController->importFile(pFileToImport); UBApplication::applicationController->importFile(pFileToImport);
#if defined(Q_WS_MAC) #if defined(Q_OS_OSX)
static AEEventHandlerUPP ub_proc_ae_handlerUPP = AEEventHandlerUPP(ub_appleEventProcessor); static AEEventHandlerUPP ub_proc_ae_handlerUPP = AEEventHandlerUPP(ub_appleEventProcessor);
AEInstallEventHandler(kCoreEventClass, kAEReopenApplication, ub_proc_ae_handlerUPP, SRefCon(UBApplication::applicationController), true); AEInstallEventHandler(kCoreEventClass, kAEReopenApplication, ub_proc_ae_handlerUPP, SRefCon(UBApplication::applicationController), true);
#endif #endif
...@@ -390,7 +390,7 @@ void UBApplication::onScreenCountChanged(int newCount) ...@@ -390,7 +390,7 @@ void UBApplication::onScreenCountChanged(int newCount)
mainWindow->actionMultiScreen->setEnabled(displayManager.numScreens() > 1); mainWindow->actionMultiScreen->setEnabled(displayManager.numScreens() > 1);
} }
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
void UBApplication::showMinimized() void UBApplication::showMinimized()
{ {
mainWindow->hide(); mainWindow->hide();
...@@ -539,7 +539,7 @@ void UBApplication::decorateActionMenu(QAction* action) ...@@ -539,7 +539,7 @@ void UBApplication::decorateActionMenu(QAction* action)
menu->addSeparator(); menu->addSeparator();
#ifndef Q_WS_X11 // No Podcast on Linux yet #ifndef Q_OS_LINUX // No Podcast on Linux yet
menu->addAction(mainWindow->actionPodcast); menu->addAction(mainWindow->actionPodcast);
mainWindow->actionPodcast->setText(tr("Podcast")); mainWindow->actionPodcast->setText(tr("Podcast"));
#endif #endif
...@@ -590,7 +590,7 @@ bool UBApplication::eventFilter(QObject *obj, QEvent *event) ...@@ -590,7 +590,7 @@ bool UBApplication::eventFilter(QObject *obj, QEvent *event)
{ {
QFileOpenEvent *fileToOpenEvent = static_cast<QFileOpenEvent *>(event); QFileOpenEvent *fileToOpenEvent = static_cast<QFileOpenEvent *>(event);
#if defined(Q_WS_MACX) #if defined(Q_OS_OSX)
ProcessSerialNumber psn; ProcessSerialNumber psn;
GetCurrentProcess(&psn); GetCurrentProcess(&psn);
SetFrontProcess(&psn); SetFrontProcess(&psn);
...@@ -611,7 +611,7 @@ bool UBApplication::eventFilter(QObject *obj, QEvent *event) ...@@ -611,7 +611,7 @@ bool UBApplication::eventFilter(QObject *obj, QEvent *event)
boardController->controlView()->setMultiselection(false); boardController->controlView()->setMultiselection(false);
} }
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
if (bIsMinimized && event->type() == QEvent::ApplicationActivate){ if (bIsMinimized && event->type() == QEvent::ApplicationActivate){
if (mainWindow->isHidden()) mainWindow->show(); if (mainWindow->isHidden()) mainWindow->show();
bIsMinimized = false; bIsMinimized = false;
......
...@@ -124,7 +124,7 @@ class UBApplication : public QtSingleApplication ...@@ -124,7 +124,7 @@ class UBApplication : public QtSingleApplication
private slots: private slots:
void closing(); void closing();
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
void showMinimized(); void showMinimized();
#endif #endif
void onScreenCountChanged(int newCount); void onScreenCountChanged(int newCount);
...@@ -137,7 +137,7 @@ class UBApplication : public QtSingleApplication ...@@ -137,7 +137,7 @@ class UBApplication : public QtSingleApplication
QString checkLanguageAvailabilityForSankore(QString& language); QString checkLanguageAvailabilityForSankore(QString& language);
protected: protected:
#if defined(Q_WS_MACX) && !defined(QT_MAC_USE_COCOA) #if defined(Q_OS_OSX) && !defined(QT_MAC_USE_COCOA)
bool macEventFilter(EventHandlerCallRef caller, EventRef event); bool macEventFilter(EventHandlerCallRef caller, EventRef event);
#endif #endif
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
#include "ui_mainWindow.h" #include "ui_mainWindow.h"
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>
#endif #endif
...@@ -122,7 +122,7 @@ UBApplicationController::UBApplicationController(UBBoardView *pControlView, ...@@ -122,7 +122,7 @@ UBApplicationController::UBApplicationController(UBBoardView *pControlView,
QTimer::singleShot (1000, this, SLOT (checkAtLaunch())); QTimer::singleShot (1000, this, SLOT (checkAtLaunch()));
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
mMainWindow->setStyleSheet("QToolButton { font-size: 11px}"); mMainWindow->setStyleSheet("QToolButton { font-size: 11px}");
#endif #endif
......
...@@ -168,7 +168,7 @@ UBDocumentProxy* UBDocumentManager::importFile(const QFile& pFile, const QString ...@@ -168,7 +168,7 @@ UBDocumentProxy* UBDocumentManager::importFile(const QFile& pFile, const QString
foreach(UBGraphicsItem* page, pages) foreach(UBGraphicsItem* page, pages)
{ {
UBApplication::showMessage(tr("Inserting page %1 of %2").arg(++nPage).arg(pages.size()), true); UBApplication::showMessage(tr("Inserting page %1 of %2").arg(++nPage).arg(pages.size()), true);
#ifdef Q_WS_MACX #ifdef Q_OS_OSX
//Workaround for issue 912 //Workaround for issue 912
QApplication::processEvents(); QApplication::processEvents();
#endif #endif
......
...@@ -50,9 +50,9 @@ UBOpenSankoreImporter::UBOpenSankoreImporter(QWidget* mainWidget, QObject *paren ...@@ -50,9 +50,9 @@ UBOpenSankoreImporter::UBOpenSankoreImporter(QWidget* mainWidget, QObject *paren
void UBOpenSankoreImporter::onProceedClicked() void UBOpenSankoreImporter::onProceedClicked()
{ {
QProcess newProcess; QProcess newProcess;
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
newProcess.startDetached(qApp->applicationDirPath()+"/Importer/OpenBoardImporter"); newProcess.startDetached(qApp->applicationDirPath()+"/Importer/OpenBoardImporter");
#elif defined Q_WS_MACX #elif defined Q_OS_OSX
newProcess.startDetached(qApp->applicationDirPath()+"/../Resources/OpenBoardImporter.app/Contents/MacOS/OpenBoardImporter"); newProcess.startDetached(qApp->applicationDirPath()+"/../Resources/OpenBoardImporter.app/Contents/MacOS/OpenBoardImporter");
#else #else
// Windows does not allows to run easily an exe located in a subdirectory when the main // Windows does not allows to run easily an exe located in a subdirectory when the main
......
...@@ -306,7 +306,7 @@ void UBSettings::init() ...@@ -306,7 +306,7 @@ void UBSettings::init()
bool defaultShowPageImmediatelyOnMirroredScreen = true; bool defaultShowPageImmediatelyOnMirroredScreen = true;
#if defined(Q_WS_X11) #if defined(Q_OS_LINUX)
// screen duplication is very slow on X11 // screen duplication is very slow on X11
defaultShowPageImmediatelyOnMirroredScreen = false; defaultShowPageImmediatelyOnMirroredScreen = false;
#endif #endif
...@@ -334,7 +334,7 @@ void UBSettings::init() ...@@ -334,7 +334,7 @@ void UBSettings::init()
int defaultRefreshRateInFramePerSecond = 8; int defaultRefreshRateInFramePerSecond = 8;
#if defined(Q_WS_X11) #if defined(Q_OS_LINUX)
// screen duplication is very slow on X11 // screen duplication is very slow on X11
defaultRefreshRateInFramePerSecond = 2; defaultRefreshRateInFramePerSecond = 2;
#endif #endif
......
...@@ -95,7 +95,7 @@ int main(int argc, char *argv[]) ...@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
qInstallMessageHandler(ub_message_output); qInstallMessageHandler(ub_message_output);
#if defined(Q_WS_X11) #if defined(Q_OS_LINUX)
qDebug() << "Setting GraphicsSystem to raster"; qDebug() << "Setting GraphicsSystem to raster";
QApplication::setGraphicsSystem("raster"); QApplication::setGraphicsSystem("raster");
#endif #endif
......
...@@ -80,7 +80,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB ...@@ -80,7 +80,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB
mTransparentDrawingView = new UBBoardView(UBApplication::boardController, static_cast<QWidget*>(0), false, true); // deleted in UBDesktopAnnotationController::destructor mTransparentDrawingView = new UBBoardView(UBApplication::boardController, static_cast<QWidget*>(0), false, true); // deleted in UBDesktopAnnotationController::destructor
mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true); mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true);
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true); mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true);
#endif #endif
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window); mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window);
...@@ -109,7 +109,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB ...@@ -109,7 +109,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB
connect( UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(keyboardActivated(bool)), connect( UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(keyboardActivated(bool)),
mTransparentDrawingView, SLOT(virtualKeyboardActivated(bool))); mTransparentDrawingView, SLOT(virtualKeyboardActivated(bool)));
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
connect(UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(moved(QPoint)), this, SLOT(refreshMask())); connect(UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(moved(QPoint)), this, SLOT(refreshMask()));
connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(refreshMask())); connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(refreshMask()));
connect(mDesktopPalette,SIGNAL(refreshMask()), this, SLOT(refreshMask())); connect(mDesktopPalette,SIGNAL(refreshMask()), this, SLOT(refreshMask()));
...@@ -162,7 +162,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB ...@@ -162,7 +162,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB
connect(&mHoldTimerMarker, SIGNAL(timeout()), this, SLOT(markerActionReleased())); connect(&mHoldTimerMarker, SIGNAL(timeout()), this, SLOT(markerActionReleased()));
connect(&mHoldTimerEraser, SIGNAL(timeout()), this, SLOT(eraserActionReleased())); connect(&mHoldTimerEraser, SIGNAL(timeout()), this, SLOT(eraserActionReleased()));
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
connect(mDesktopPalette, SIGNAL(moving()), this, SLOT(refreshMask())); connect(mDesktopPalette, SIGNAL(moving()), this, SLOT(refreshMask()));
connect(UBApplication::boardController->paletteManager()->rightPalette(), SIGNAL(resized()), this, SLOT(refreshMask())); connect(UBApplication::boardController->paletteManager()->rightPalette(), SIGNAL(resized()), this, SLOT(refreshMask()));
connect(UBApplication::boardController->paletteManager()->addItemPalette(), SIGNAL(closed()), this, SLOT(refreshMask())); connect(UBApplication::boardController->paletteManager()->addItemPalette(), SIGNAL(closed()), this, SLOT(refreshMask()));
...@@ -331,7 +331,7 @@ void UBDesktopAnnotationController::showWindow() ...@@ -331,7 +331,7 @@ void UBDesktopAnnotationController::showWindow()
UBDrawingController::drawingController()->setStylusTool(mDesktopStylusTool); UBDrawingController::drawingController()->setStylusTool(mDesktopStylusTool);
#ifndef Q_WS_X11 #ifndef Q_OS_LINUX
mTransparentDrawingView->showFullScreen(); mTransparentDrawingView->showFullScreen();
#else #else
// this is necessary to avoid unity to hide the panels // this is necessary to avoid unity to hide the panels
...@@ -341,7 +341,7 @@ void UBDesktopAnnotationController::showWindow() ...@@ -341,7 +341,7 @@ void UBDesktopAnnotationController::showWindow()
mDesktopPalette->appear(); mDesktopPalette->appear();
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
updateMask(true); updateMask(true);
#endif #endif
} }
...@@ -375,18 +375,18 @@ void UBDesktopAnnotationController::updateBackground() ...@@ -375,18 +375,18 @@ void UBDesktopAnnotationController::updateBackground()
|| UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Selector) || UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Selector)
{ {
newBrush = QBrush(Qt::transparent); newBrush = QBrush(Qt::transparent);
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
updateMask(true); updateMask(true);
#endif #endif
} }
else else
{ {
#if defined(Q_WS_MAC) #if defined(Q_OS_OSX)
newBrush = QBrush(QColor(127, 127, 127, 15)); newBrush = QBrush(QColor(127, 127, 127, 15));
#else #else
newBrush = QBrush(QColor(127, 127, 127, 1)); newBrush = QBrush(QColor(127, 127, 127, 1));
#endif #endif
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
updateMask(false); updateMask(false);
#endif #endif
} }
...@@ -430,7 +430,7 @@ void UBDesktopAnnotationController::customCapture() ...@@ -430,7 +430,7 @@ void UBDesktopAnnotationController::customCapture()
UBCustomCaptureWindow customCaptureWindow(mDesktopPalette); UBCustomCaptureWindow customCaptureWindow(mDesktopPalette);
// need to show the window before execute it to avoid some glitch on windows. // need to show the window before execute it to avoid some glitch on windows.
#ifndef Q_WS_WIN // Working only without this call on win32 desktop mode #ifndef Q_OS_WIN // Working only without this call on win32 desktop mode
customCaptureWindow.show(); customCaptureWindow.show();
#endif #endif
...@@ -901,7 +901,7 @@ void UBDesktopAnnotationController::updateMask(bool bTransparent) ...@@ -901,7 +901,7 @@ void UBDesktopAnnotationController::updateMask(bool bTransparent)
p.drawRect(tabsPalette); p.drawRect(tabsPalette);
} }
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
//Rquiered only for compiz wm //Rquiered only for compiz wm
//TODO. Window manager detection screen //TODO. Window manager detection screen
......
...@@ -171,7 +171,7 @@ void UBDesktopPalette::minimizeMe(eMinimizedLocation location) ...@@ -171,7 +171,7 @@ void UBDesktopPalette::minimizeMe(eMinimizedLocation location)
adjustSizeAndPosition(); adjustSizeAndPosition();
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
emit refreshMask(); emit refreshMask();
#endif #endif
} }
...@@ -201,7 +201,7 @@ void UBDesktopPalette::maximizeMe() ...@@ -201,7 +201,7 @@ void UBDesktopPalette::maximizeMe()
// Notify that the maximization has been done // Notify that the maximization has been done
emit maximized(); emit maximized();
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
emit refreshMask(); emit refreshMask();
#endif #endif
} }
......
...@@ -55,7 +55,7 @@ class UBDesktopPalette : public UBActionPalette ...@@ -55,7 +55,7 @@ class UBDesktopPalette : public UBActionPalette
void windowClick(); void windowClick();
void screenClick(); void screenClick();
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
void refreshMask(); void refreshMask();
#endif #endif
......
...@@ -355,7 +355,7 @@ void UBDocumentController::setupViews() ...@@ -355,7 +355,7 @@ void UBDocumentController::setupViews()
} }
} }
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
mMainWindow->actionDelete->setShortcut(QKeySequence(Qt::Key_Backspace)); mMainWindow->actionDelete->setShortcut(QKeySequence(Qt::Key_Backspace));
#endif #endif
...@@ -394,7 +394,7 @@ void UBDocumentController::setupViews() ...@@ -394,7 +394,7 @@ void UBDocumentController::setupViews()
mDocumentUI->thumbnailWidget->setBackgroundBrush(UBSettings::documentViewLightColor); mDocumentUI->thumbnailWidget->setBackgroundBrush(UBSettings::documentViewLightColor);
#ifdef Q_WS_MACX #ifdef Q_OS_OSX
mMessageWindow = new UBMessageWindow(NULL); mMessageWindow = new UBMessageWindow(NULL);
#else #else
mMessageWindow = new UBMessageWindow(mDocumentUI->thumbnailWidget); mMessageWindow = new UBMessageWindow(mDocumentUI->thumbnailWidget);
...@@ -1452,7 +1452,7 @@ void UBDocumentController::showMessage(const QString& message, bool showSpinning ...@@ -1452,7 +1452,7 @@ void UBDocumentController::showMessage(const QString& message, bool showSpinning
QRect newSize = mDocumentUI->thumbnailWidget->geometry(); QRect newSize = mDocumentUI->thumbnailWidget->geometry();
#ifdef Q_WS_MACX #ifdef Q_OS_OSX
QPoint point(newSize.left() + margin, newSize.bottom() - mMessageWindow->height() - margin); QPoint point(newSize.left() + margin, newSize.bottom() - mMessageWindow->height() - margin);
mMessageWindow->move(mDocumentUI->thumbnailWidget->mapToGlobal(point)); mMessageWindow->move(mDocumentUI->thumbnailWidget->mapToGlobal(point));
#else #else
......
...@@ -771,7 +771,7 @@ void UBGraphicsItemDelegate::updateButtons(bool showUpdated) ...@@ -771,7 +771,7 @@ void UBGraphicsItemDelegate::updateButtons(bool showUpdated)
qreal topXTitleBar = topX + (1.6 * mFrameWidth * mAntiScaleRatio); qreal topXTitleBar = topX + (1.6 * mFrameWidth * mAntiScaleRatio);
qreal topYTitleBar = topY + frameButtonHeight *mAntiScaleRatio; qreal topYTitleBar = topY + frameButtonHeight *mAntiScaleRatio;
#ifndef Q_WS_X11 #ifndef Q_OS_LINUX
topYTitleBar += 5; topYTitleBar += 5;
#endif #endif
......
...@@ -57,7 +57,7 @@ UBFileSystemUtils::~UBFileSystemUtils() ...@@ -57,7 +57,7 @@ UBFileSystemUtils::~UBFileSystemUtils()
QString UBFileSystemUtils::removeLocalFilePrefix(QString input) QString UBFileSystemUtils::removeLocalFilePrefix(QString input)
{ {
#ifdef Q_WS_WIN #ifdef Q_OS_WIN
if(input.startsWith("file:///")) if(input.startsWith("file:///"))
return input.mid(8); return input.mid(8);
else else
......
...@@ -204,7 +204,7 @@ public: ...@@ -204,7 +204,7 @@ public:
static QString urlFromClipboard(); static QString urlFromClipboard();
static QStringList availableTranslations(); static QStringList availableTranslations();
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
static void SetMacLocaleByIdentifier(const QString& id); static void SetMacLocaleByIdentifier(const QString& id);
#endif #endif
}; };
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
setStyleSheet(style);\ setStyleSheet(style);\
} }
#ifdef Q_WS_WIN #ifdef Q_OS_WIN
#define WARNINGS_DISABLE __pragma(warning(push, 0)); #define WARNINGS_DISABLE __pragma(warning(push, 0));
#define WARNINGS_ENABLE __pragma(warning(pop)); #define WARNINGS_ENABLE __pragma(warning(pop));
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
#define THIRD_PARTY_WARNINGS_DISABLE __pragma(warning(push)); #define THIRD_PARTY_WARNINGS_DISABLE __pragma(warning(push));
#endif //#ifdef NO_THIRD_PARTY_WARNINGS #endif //#ifdef NO_THIRD_PARTY_WARNINGS
#else //#ifdef Q_WS_WIN #else //#ifdef Q_OS_WIN
#define WARNINGS_DISABLE _Pragma("GCC diagnostic push"); \ #define WARNINGS_DISABLE _Pragma("GCC diagnostic push"); \
_Pragma("GCC diagnostic ignored \"-Wunused-parameter\""); \ _Pragma("GCC diagnostic ignored \"-Wunused-parameter\""); \
...@@ -76,7 +76,7 @@ _Pragma("GCC diagnostic ignored \"-Wsign-compare\""); ...@@ -76,7 +76,7 @@ _Pragma("GCC diagnostic ignored \"-Wsign-compare\"");
#endif //#ifdef NO_THIRD_PARTY_WARNINGS #endif //#ifdef NO_THIRD_PARTY_WARNINGS
#endif //#ifdef Q_WS_WIN #endif //#ifdef Q_OS_WIN
// anyway on any OS // anyway on any OS
#define THIRD_PARTY_WARNINGS_ENABLE WARNINGS_ENABLE #define THIRD_PARTY_WARNINGS_ENABLE WARNINGS_ENABLE
......
...@@ -54,11 +54,11 @@ UBFloatingPalette::UBFloatingPalette(Qt::Corner position, QWidget *parent) ...@@ -54,11 +54,11 @@ UBFloatingPalette::UBFloatingPalette(Qt::Corner position, QWidget *parent)
{ {
// standalone window // standalone window
// !!!! Should be included into Windows after QT recompilation // !!!! Should be included into Windows after QT recompilation
#ifndef Q_WS_WIN #ifndef Q_OS_WIN
setAttribute(Qt::WA_TranslucentBackground); setAttribute(Qt::WA_TranslucentBackground);
setAttribute(Qt::WA_MacAlwaysShowToolWindow); setAttribute(Qt::WA_MacAlwaysShowToolWindow);
#endif #endif
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
setAttribute(Qt::WA_MacAlwaysShowToolWindow); setAttribute(Qt::WA_MacAlwaysShowToolWindow);
setAttribute(Qt::WA_MacNonActivatingToolWindow); setAttribute(Qt::WA_MacNonActivatingToolWindow);
setAttribute(Qt::WA_MacNoShadow); setAttribute(Qt::WA_MacNoShadow);
......
...@@ -79,11 +79,11 @@ UBMagnifier::UBMagnifier(QWidget *parent, bool isInteractive) ...@@ -79,11 +79,11 @@ UBMagnifier::UBMagnifier(QWidget *parent, bool isInteractive)
{ {
// standalone window // standalone window
// !!!! Should be included into Windows after QT recompilation // !!!! Should be included into Windows after QT recompilation
#ifndef Q_WS_WIN #ifndef Q_OS_WIN
// setAttribute(Qt::WA_TranslucentBackground); // setAttribute(Qt::WA_TranslucentBackground);
setAttribute(Qt::WA_MacAlwaysShowToolWindow); setAttribute(Qt::WA_MacAlwaysShowToolWindow);
#endif #endif
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
setAttribute(Qt::WA_MacAlwaysShowToolWindow); setAttribute(Qt::WA_MacAlwaysShowToolWindow);
setAttribute(Qt::WA_MacNonActivatingToolWindow); setAttribute(Qt::WA_MacNonActivatingToolWindow);
setAttribute(Qt::WA_MacNoShadow); setAttribute(Qt::WA_MacNoShadow);
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "core/UBDisplayManager.h" #include "core/UBDisplayManager.h"
// work around for handling tablet events on MAC OS with Qt 4.8.0 and above // work around for handling tablet events on MAC OS with Qt 4.8.0 and above
#if defined(Q_WS_MACX) #if defined(Q_OS_OSX)
#include "board/UBBoardView.h" #include "board/UBBoardView.h"
#endif #endif
...@@ -64,10 +64,10 @@ UBMainWindow::UBMainWindow(QWidget *parent, Qt::WindowFlags flags) ...@@ -64,10 +64,10 @@ UBMainWindow::UBMainWindow(QWidget *parent, Qt::WindowFlags flags)
mStackedLayout = new QStackedLayout(centralWidget); mStackedLayout = new QStackedLayout(centralWidget);
setCentralWidget(centralWidget); setCentralWidget(centralWidget);
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
actionPreferences->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Comma)); actionPreferences->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Comma));
actionQuit->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); actionQuit->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
#elif defined(Q_WS_WIN) #elif defined(Q_OS_WIN)
actionPreferences->setShortcut(QKeySequence(Qt::ALT + Qt::Key_Return)); actionPreferences->setShortcut(QKeySequence(Qt::ALT + Qt::Key_Return));
// this code, because it unusable, system key combination can`t be triggered, even we add it manually // this code, because it unusable, system key combination can`t be triggered, even we add it manually
actionQuit->setShortcut(QKeySequence(Qt::ALT + Qt::Key_F4)); actionQuit->setShortcut(QKeySequence(Qt::ALT + Qt::Key_F4));
...@@ -150,7 +150,7 @@ void UBMainWindow::closeEvent(QCloseEvent *event) ...@@ -150,7 +150,7 @@ void UBMainWindow::closeEvent(QCloseEvent *event)
} }
// work around for handling tablet events on MAC OS with Qt 4.8.0 and above // work around for handling tablet events on MAC OS with Qt 4.8.0 and above
#if defined(Q_WS_MACX) #if defined(Q_OS_OSX)
bool UBMainWindow::event(QEvent *event) bool UBMainWindow::event(QEvent *event)
{ {
bool bRes = QMainWindow::event(event); bool bRes = QMainWindow::event(event);
...@@ -201,7 +201,7 @@ bool UBMainWindow::yesNoQuestion(QString windowTitle, QString text) ...@@ -201,7 +201,7 @@ bool UBMainWindow::yesNoQuestion(QString windowTitle, QString text)
messageBox.addButton(tr("No"),QMessageBox::NoRole); messageBox.addButton(tr("No"),QMessageBox::NoRole);
messageBox.setIcon(QMessageBox::Question); messageBox.setIcon(QMessageBox::Question);
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
// to avoid to be handled by x11. This allows us to keep to the back all the windows manager stuff like palette, toolbar ... // to avoid to be handled by x11. This allows us to keep to the back all the windows manager stuff like palette, toolbar ...
messageBox.setWindowFlags(Qt::Dialog | Qt::X11BypassWindowManagerHint); messageBox.setWindowFlags(Qt::Dialog | Qt::X11BypassWindowManagerHint);
#else #else
......
...@@ -88,7 +88,7 @@ class UBMainWindow : public QMainWindow, public Ui::MainWindow ...@@ -88,7 +88,7 @@ class UBMainWindow : public QMainWindow, public Ui::MainWindow
private: private:
// work around for handling tablet events on MAC OS with Qt 4.8.0 and above // work around for handling tablet events on MAC OS with Qt 4.8.0 and above
#if defined(Q_WS_MACX) #if defined(Q_OS_OSX)
bool event(QEvent *event); bool event(QEvent *event);
#endif #endif
UBDownloadWidget* mpDownloadWidget; UBDownloadWidget* mpDownloadWidget;
......
...@@ -44,7 +44,7 @@ UBMessageWindow::UBMessageWindow(QWidget *parent) ...@@ -44,7 +44,7 @@ UBMessageWindow::UBMessageWindow(QWidget *parent)
mLayout->setContentsMargins(radius() + 15, 4, radius() + 15, 4); mLayout->setContentsMargins(radius() + 15, 4, radius() + 15, 4);
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
mLayout->setContentsMargins(radius() + 15, 8, radius() + 15, 10); mLayout->setContentsMargins(radius() + 15, 8, radius() + 15, 10);
#endif #endif
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <QtGui> #include <QtGui>
#include <QStyleFactory> #include <QStyleFactory>
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
#include <QtGui/QMacStyle> #include <QtGui/QMacStyle>
#endif #endif
...@@ -49,11 +49,11 @@ UBRubberBand::UBRubberBand(Shape s, QWidget * p) ...@@ -49,11 +49,11 @@ UBRubberBand::UBRubberBand(Shape s, QWidget * p)
{ {
customStyle = NULL; customStyle = NULL;
#ifdef Q_WS_WIN #ifdef Q_OS_WIN
customStyle = new QWindowsXPStyle(); customStyle = new QWindowsXPStyle();
#elif defined(Q_WS_MAC) #elif defined(Q_OS_OSX)
customStyle = new QMacStyle(); customStyle = new QMacStyle();
#elif defined(Q_WS_X11) #elif defined(Q_OS_LINUX)
customStyle = QStyleFactory::create("oxygen"); customStyle = QStyleFactory::create("oxygen");
#endif #endif
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "core/UBApplication.h" #include "core/UBApplication.h"
#include "board/UBBoardController.h" #include "board/UBBoardController.h"
#if defined(Q_WS_MAC) #if defined(Q_OS_OSX)
#include <ApplicationServices/ApplicationServices.h> #include <ApplicationServices/ApplicationServices.h>
#endif #endif
......
...@@ -246,7 +246,7 @@ void UBThumbnailWidget::mousePressEvent(QMouseEvent *event) ...@@ -246,7 +246,7 @@ void UBThumbnailWidget::mousePressEvent(QMouseEvent *event)
mLassoRectItem = new QGraphicsRectItem(0); mLassoRectItem = new QGraphicsRectItem(0);
scene()->addItem(mLassoRectItem); scene()->addItem(mLassoRectItem);
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
// The following code must stay in synch with <Qt installation folder>\src\gui\styles\qmacstyle_mac.mm // The following code must stay in synch with <Qt installation folder>\src\gui\styles\qmacstyle_mac.mm
QColor strokeColor; QColor strokeColor;
strokeColor.setHsvF(0, 0, 0.86, 1.0); strokeColor.setHsvF(0, 0, 0.86, 1.0);
......
...@@ -56,10 +56,10 @@ ...@@ -56,10 +56,10 @@
#ifdef Q_WS_WIN #ifdef Q_OS_WIN
#include "windowsmedia/UBWindowsMediaVideoEncoder.h" #include "windowsmedia/UBWindowsMediaVideoEncoder.h"
#include "windowsmedia/UBWaveRecorder.h" #include "windowsmedia/UBWaveRecorder.h"
#elif defined(Q_WS_MAC) #elif defined(Q_OS_OSX)
#include "quicktime/UBQuickTimeVideoEncoder.h" #include "quicktime/UBQuickTimeVideoEncoder.h"
#include "quicktime/UBAudioQueueRecorder.h" #include "quicktime/UBAudioQueueRecorder.h"
#endif #endif
...@@ -303,9 +303,9 @@ void UBPodcastController::start() ...@@ -303,9 +303,9 @@ void UBPodcastController::start()
applicationMainModeChanged(UBApplication::applicationController->displayMode()); applicationMainModeChanged(UBApplication::applicationController->displayMode());
#ifdef Q_WS_WIN #ifdef Q_OS_WIN
mVideoEncoder = new UBWindowsMediaVideoEncoder(this); //deleted on stop mVideoEncoder = new UBWindowsMediaVideoEncoder(this); //deleted on stop
#elif defined(Q_WS_MAC) #elif defined(Q_OS_OSX)
mVideoEncoder = new UBQuickTimeVideoEncoder(this); //deleted on stop mVideoEncoder = new UBQuickTimeVideoEncoder(this); //deleted on stop
#endif #endif
...@@ -793,9 +793,9 @@ QStringList UBPodcastController::audioRecordingDevices() ...@@ -793,9 +793,9 @@ QStringList UBPodcastController::audioRecordingDevices()
{ {
QStringList devices; QStringList devices;
#ifdef Q_WS_WIN #ifdef Q_OS_WIN
devices = UBWaveRecorder::waveInDevices(); devices = UBWaveRecorder::waveInDevices();
#elif defined(Q_WS_MAC) #elif defined(Q_OS_OSX)
devices = UBAudioQueueRecorder::waveInDevices(); devices = UBAudioQueueRecorder::waveInDevices();
#endif #endif
......
...@@ -641,7 +641,7 @@ void UBQuickTimeFile::appendAudioBuffer(void* pBuffer, long pLength, int inNumbe ...@@ -641,7 +641,7 @@ void UBQuickTimeFile::appendAudioBuffer(void* pBuffer, long pLength, int inNumbe
} }
} }
} }
#ifdef Q_WS_MACX #ifdef Q_OS_OSX
free((void*)inPacketDescs); free((void*)inPacketDescs);
#endif #endif
} }
......
...@@ -378,7 +378,7 @@ void UBGraphicsProtractor::paintGraduations(QPainter *painter) ...@@ -378,7 +378,7 @@ void UBGraphicsProtractor::paintGraduations(QPainter *painter)
const int oneDegreeGraduationLength = 5; const int oneDegreeGraduationLength = 5;
QFont font1 = painter->font(); QFont font1 = painter->font();
#ifdef Q_WS_MAC #ifdef Q_OS_OSX
font1.setPointSizeF(font1.pointSizeF() - 3); font1.setPointSizeF(font1.pointSizeF() - 3);
#endif #endif
QFontMetricsF fm1(font1); QFontMetricsF fm1(font1);
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "UBTrapFlashController.h" #include "UBTrapFlashController.h"
#include <QtXml> #include <QtXml>
#include <QWebFrame>
#include "frameworks/UBFileSystemUtils.h" #include "frameworks/UBFileSystemUtils.h"
...@@ -99,22 +100,17 @@ void UBTrapFlashController::text_Changed(const QString &newText) ...@@ -99,22 +100,17 @@ void UBTrapFlashController::text_Changed(const QString &newText)
{ {
QString new_text = newText; QString new_text = newText;
#ifdef Q_WS_WIN // Defined on Windows. #ifdef Q_OS_WIN // Defined on Windows.
QString illegalCharList(" < > : \" / \\ | ? * "); QString illegalCharList(" < > : \" / \\ | ? * ");
QRegExp regExp("[<>:\"/\\\\|?*]"); QRegExp regExp("[<>:\"/\\\\|?*]");
#endif #endif
#ifdef Q_WS_QWS // Defined on Qt for Embedded Linux. #ifdef Q_OS_OSX // Defined on Mac OS X.
QString illegalCharList(" < > : \" / \\ | ? * "); QString illegalCharList(" < > : \" / \\ | ? * ");
QRegExp regExp("[<>:\"/\\\\|?*]"); QRegExp regExp("[<>:\"/\\\\|?*]");
#endif #endif
#ifdef Q_WS_MAC // Defined on Mac OS X. #ifdef Q_OS_LINUX // Defined on X11.
QString illegalCharList(" < > : \" / \\ | ? * ");
QRegExp regExp("[<>:\"/\\\\|?*]");
#endif
#ifdef Q_WS_X11 // Defined on X11.
QString illegalCharList(" < > : \" / \\ | ? * "); QString illegalCharList(" < > : \" / \\ | ? * ");
QRegExp regExp("[<>:\"/\\\\|?*]"); QRegExp regExp("[<>:\"/\\\\|?*]");
#endif #endif
......
...@@ -299,7 +299,7 @@ void UBWebController::setupPalettes() ...@@ -299,7 +299,7 @@ void UBWebController::setupPalettes()
{ {
mToolsCurrentPalette = new UBWebToolsPalette(UBApplication::mainWindow); mToolsCurrentPalette = new UBWebToolsPalette(UBApplication::mainWindow);
UBApplication::boardController->paletteManager()->setCurrentWebToolsPalette(mToolsCurrentPalette); UBApplication::boardController->paletteManager()->setCurrentWebToolsPalette(mToolsCurrentPalette);
#ifndef Q_WS_WIN #ifndef Q_OS_WIN
if (UBPlatformUtils::hasVirtualKeyboard() && UBApplication::boardController->paletteManager()->mKeyboardPalette) if (UBPlatformUtils::hasVirtualKeyboard() && UBApplication::boardController->paletteManager()->mKeyboardPalette)
connect(UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(closed()), connect(UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(closed()),
UBApplication::boardController->paletteManager()->mKeyboardPalette, SLOT(onDeactivated())); UBApplication::boardController->paletteManager()->mKeyboardPalette, SLOT(onDeactivated()));
......
...@@ -109,7 +109,7 @@ WBTabBar::WBTabBar(QWidget *parent) ...@@ -109,7 +109,7 @@ WBTabBar::WBTabBar(QWidget *parent)
setMovable(true); setMovable(true);
setDocumentMode(false); setDocumentMode(false);
#ifdef Q_WS_MACX #ifdef Q_OS_OSX
QFont baseFont = font(); QFont baseFont = font();
baseFont.setPointSize(baseFont.pointSize() - 2); baseFont.setPointSize(baseFont.pointSize() - 2);
setFont(baseFont); setFont(baseFont);
......
...@@ -63,7 +63,7 @@ void WBWebTrapWebView::setIsTrapping(bool pIsTrapping) ...@@ -63,7 +63,7 @@ void WBWebTrapWebView::setIsTrapping(bool pIsTrapping)
mDomElementRect = QRect(); mDomElementRect = QRect();
mCurrentContentType = Unknown; mCurrentContentType = Unknown;
/* /*
#if defined(Q_WS_WIN) #if defined(Q_OS_WIN)
if(mIsTrapping) if(mIsTrapping)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment