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
preferencesAboutTextFull
Craig Watson 9 years ago
parent 55dd0450ff
commit bedf11cc2d
  1. 2
      src/adaptors/UBSvgSubsetAdaptor.cpp
  2. 8
      src/board/UBBoardController.cpp
  3. 16
      src/board/UBBoardPaletteManager.cpp
  4. 6
      src/board/UBBoardView.cpp
  5. 2
      src/board/UBBoardView.h
  6. 20
      src/core/UBApplication.cpp
  7. 4
      src/core/UBApplication.h
  8. 4
      src/core/UBApplicationController.cpp
  9. 2
      src/core/UBDocumentManager.cpp
  10. 4
      src/core/UBOpenSankoreImporter.cpp
  11. 4
      src/core/UBSettings.cpp
  12. 2
      src/core/main.cpp
  13. 20
      src/desktop/UBDesktopAnnotationController.cpp
  14. 4
      src/desktop/UBDesktopPalette.cpp
  15. 2
      src/desktop/UBDesktopPalette.h
  16. 6
      src/document/UBDocumentController.cpp
  17. 2
      src/domain/UBGraphicsItemDelegate.cpp
  18. 2
      src/frameworks/UBFileSystemUtils.cpp
  19. 2
      src/frameworks/UBPlatformUtils.h
  20. 6
      src/globals/UBGlobals.h
  21. 4
      src/gui/UBFloatingPalette.cpp
  22. 4
      src/gui/UBMagnifer.cpp
  23. 10
      src/gui/UBMainWindow.cpp
  24. 2
      src/gui/UBMainWindow.h
  25. 2
      src/gui/UBMessageWindow.cpp
  26. 8
      src/gui/UBRubberBand.cpp
  27. 2
      src/gui/UBScreenMirror.cpp
  28. 2
      src/gui/UBThumbnailWidget.cpp
  29. 12
      src/podcast/UBPodcastController.cpp
  30. 2
      src/podcast/quicktime/UBQuickTimeFile.cpp
  31. 2
      src/tools/UBGraphicsProtractor.cpp
  32. 12
      src/web/UBTrapFlashController.cpp
  33. 2
      src/web/UBWebController.cpp
  34. 2
      src/web/browser/WBTabWidget.cpp
  35. 2
      src/web/browser/WBWebTrapWebView.cpp

@ -2140,7 +2140,7 @@ void UBSvgSubsetAdaptor::UBSvgSubsetReader::graphicsItemFromSvg(QGraphicsItem* g
{
if (!svgX.isNull() && !svgY.isNull())
{
#ifdef Q_WS_WIN
#ifdef Q_OS_WIN
gItem->setPos(svgX.toString().toFloat(), svgY.toString().toFloat());
#endif
}

@ -86,7 +86,7 @@
#include "core/memcheck.h"
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
#include <QProcess>
bool onboardIsAlreadyRunning = true;
#endif
@ -165,7 +165,7 @@ void UBBoardController::init()
UBBoardController::~UBBoardController()
{
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
if(!onboardIsAlreadyRunning){
QProcess newProcess;
newProcess.startDetached("killall onboard");
@ -828,7 +828,7 @@ void UBBoardController::showKeyboard(bool show)
if(show)
UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector);
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
static bool isFirstTime = true;
if(isFirstTime){
QProcess isAlreadyRunningProcess;
@ -2411,7 +2411,7 @@ void UBBoardController::processMimeData(const QMimeData* pMimeData, const QPoint
}
}
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.
// This is due to the way Safari is working so we have to dig into the pasteboard in order to retrieve
// the data.

@ -225,7 +225,7 @@ void UBBoardPaletteManager::setupPalettes()
if (UBPlatformUtils::hasVirtualKeyboard())
{
mKeyboardPalette = new UBKeyboardPalette(0);
#ifndef Q_WS_WIN
#ifndef Q_OS_WIN
connect(mKeyboardPalette, SIGNAL(closed()), mKeyboardPalette, SLOT(onDeactivated()));
#endif
}
@ -677,7 +677,7 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
mLeftPalette->setVisible(leftPaletteVisible);
mRightPalette->setVisible(rightPaletteVisible);
#ifdef Q_WS_WIN
#ifdef Q_OS_WIN
if (rightPaletteVisible)
mRightPalette->setAdditionalVOffset(0);
#endif
@ -702,24 +702,24 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
if(mKeyboardPalette->m_isVisible)
{
mKeyboardPalette->hide();
#ifndef Q_WS_X11
#ifndef Q_OS_LINUX
mKeyboardPalette->setParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView());
#else
mKeyboardPalette->setParent(0);
#endif
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
mKeyboardPalette->setWindowFlags(Qt::Dialog | Qt::Popup | Qt::FramelessWindowHint);
#endif
mKeyboardPalette->show();
}
else
// In linux keyboard in desktop mode have to allways be with null parent
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
mKeyboardPalette->setParent(0);
#else
mKeyboardPalette->setParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView());
#endif //Q_WS_X11
#ifdef Q_WS_MAC
#endif //Q_OS_LINUX
#ifdef Q_OS_OSX
mKeyboardPalette->setWindowFlags(Qt::Dialog | Qt::Popup | Qt::FramelessWindowHint);
#endif
@ -727,7 +727,7 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
mLeftPalette->setVisible(leftPaletteVisible);
mRightPalette->setVisible(rightPaletteVisible);
#ifdef Q_WS_WIN
#ifdef Q_OS_WIN
if (rightPaletteVisible && UBSettings::settings()->appToolBarPositionedAtTop->get().toBool())
mRightPalette->setAdditionalVOffset(30);
#endif

@ -55,7 +55,7 @@
#include "board/UBBoardController.h"
#include "board/UBBoardPaletteManager.h"
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
#include "core/UBApplicationController.h"
#include "desktop/UBDesktopAnnotationController.h"
#endif
@ -366,7 +366,7 @@ void UBBoardView::tabletEvent (QTabletEvent * event)
}
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
//using Mac OS X. In this case tablet event should send mouse event so as to let user interact with
//stylus palette.
@ -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
#if defined(Q_WS_MACX)
#if defined(Q_OS_OSX)
bool UBBoardView::directTabletEvent(QEvent *event)
{
QTabletEvent *tEvent = static_cast<QTabletEvent *>(event);

@ -63,7 +63,7 @@ public:
void setMultiselection(bool enable);
bool isMultipleSelectionEnabled() { return mMultipleSelectionIsEnabled; }
// 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);
QWidget *widgetForTabletEvent(QWidget *w, const QPoint &pos);
#endif

@ -33,7 +33,7 @@
#include <QFontDatabase>
#include <QStyleFactory>
#if defined(Q_WS_MACX)
#if defined(Q_OS_OSX)
#include <Carbon/Carbon.h>
#endif
@ -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::mimeTypeUniboardPageThumbnail = QString("application/vnd.mnemis-uniboard-thumbnail");
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
bool bIsMinimized = false;
#endif
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)
{
Q_UNUSED(event);
@ -154,7 +154,7 @@ UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSing
connect(settings->appToolBarDisplayText, SIGNAL(changed(QVariant)), this, SLOT(toolBarDisplayTextChanged(QVariant)));
updateProtoActionsState();
#ifndef Q_WS_MAC
#ifndef Q_OS_OSX
setWindowIcon(QIcon(":/images/OpenBoard.png"));
#endif
@ -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)), this, SLOT(stopScript()));
#ifndef Q_WS_MAC
#ifndef Q_OS_OSX
connect(mainWindow->actionHideApplication, SIGNAL(triggered()), mainWindow, SLOT(showMinimized()));
#else
connect(mainWindow->actionHideApplication, SIGNAL(triggered()), this, SLOT(showMinimized()));
@ -368,7 +368,7 @@ int UBApplication::exec(const QString& pFileToImport)
if (pFileToImport.length() > 0)
UBApplication::applicationController->importFile(pFileToImport);
#if defined(Q_WS_MAC)
#if defined(Q_OS_OSX)
static AEEventHandlerUPP ub_proc_ae_handlerUPP = AEEventHandlerUPP(ub_appleEventProcessor);
AEInstallEventHandler(kCoreEventClass, kAEReopenApplication, ub_proc_ae_handlerUPP, SRefCon(UBApplication::applicationController), true);
#endif
@ -390,7 +390,7 @@ void UBApplication::onScreenCountChanged(int newCount)
mainWindow->actionMultiScreen->setEnabled(displayManager.numScreens() > 1);
}
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
void UBApplication::showMinimized()
{
mainWindow->hide();
@ -539,7 +539,7 @@ void UBApplication::decorateActionMenu(QAction* action)
menu->addSeparator();
#ifndef Q_WS_X11 // No Podcast on Linux yet
#ifndef Q_OS_LINUX // No Podcast on Linux yet
menu->addAction(mainWindow->actionPodcast);
mainWindow->actionPodcast->setText(tr("Podcast"));
#endif
@ -590,7 +590,7 @@ bool UBApplication::eventFilter(QObject *obj, QEvent *event)
{
QFileOpenEvent *fileToOpenEvent = static_cast<QFileOpenEvent *>(event);
#if defined(Q_WS_MACX)
#if defined(Q_OS_OSX)
ProcessSerialNumber psn;
GetCurrentProcess(&psn);
SetFrontProcess(&psn);
@ -611,7 +611,7 @@ bool UBApplication::eventFilter(QObject *obj, QEvent *event)
boardController->controlView()->setMultiselection(false);
}
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
if (bIsMinimized && event->type() == QEvent::ApplicationActivate){
if (mainWindow->isHidden()) mainWindow->show();
bIsMinimized = false;

@ -124,7 +124,7 @@ class UBApplication : public QtSingleApplication
private slots:
void closing();
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
void showMinimized();
#endif
void onScreenCountChanged(int newCount);
@ -137,7 +137,7 @@ class UBApplication : public QtSingleApplication
QString checkLanguageAvailabilityForSankore(QString& language);
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);
#endif

@ -67,7 +67,7 @@
#include "ui_mainWindow.h"
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
#include <Carbon/Carbon.h>
#endif
@ -122,7 +122,7 @@ UBApplicationController::UBApplicationController(UBBoardView *pControlView,
QTimer::singleShot (1000, this, SLOT (checkAtLaunch()));
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
mMainWindow->setStyleSheet("QToolButton { font-size: 11px}");
#endif

@ -168,7 +168,7 @@ UBDocumentProxy* UBDocumentManager::importFile(const QFile& pFile, const QString
foreach(UBGraphicsItem* page, pages)
{
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
QApplication::processEvents();
#endif

@ -50,9 +50,9 @@ UBOpenSankoreImporter::UBOpenSankoreImporter(QWidget* mainWidget, QObject *paren
void UBOpenSankoreImporter::onProceedClicked()
{
QProcess newProcess;
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
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");
#else
// Windows does not allows to run easily an exe located in a subdirectory when the main

@ -306,7 +306,7 @@ void UBSettings::init()
bool defaultShowPageImmediatelyOnMirroredScreen = true;
#if defined(Q_WS_X11)
#if defined(Q_OS_LINUX)
// screen duplication is very slow on X11
defaultShowPageImmediatelyOnMirroredScreen = false;
#endif
@ -334,7 +334,7 @@ void UBSettings::init()
int defaultRefreshRateInFramePerSecond = 8;
#if defined(Q_WS_X11)
#if defined(Q_OS_LINUX)
// screen duplication is very slow on X11
defaultRefreshRateInFramePerSecond = 2;
#endif

@ -95,7 +95,7 @@ int main(int argc, char *argv[])
qInstallMessageHandler(ub_message_output);
#if defined(Q_WS_X11)
#if defined(Q_OS_LINUX)
qDebug() << "Setting GraphicsSystem to raster";
QApplication::setGraphicsSystem("raster");
#endif

@ -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->setAttribute(Qt::WA_TranslucentBackground, true);
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true);
#endif
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window);
@ -109,7 +109,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB
connect( UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(keyboardActivated(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::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(refreshMask()));
connect(mDesktopPalette,SIGNAL(refreshMask()), this, SLOT(refreshMask()));
@ -162,7 +162,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB
connect(&mHoldTimerMarker, SIGNAL(timeout()), this, SLOT(markerActionReleased()));
connect(&mHoldTimerEraser, SIGNAL(timeout()), this, SLOT(eraserActionReleased()));
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
connect(mDesktopPalette, SIGNAL(moving()), this, SLOT(refreshMask()));
connect(UBApplication::boardController->paletteManager()->rightPalette(), SIGNAL(resized()), this, SLOT(refreshMask()));
connect(UBApplication::boardController->paletteManager()->addItemPalette(), SIGNAL(closed()), this, SLOT(refreshMask()));
@ -331,7 +331,7 @@ void UBDesktopAnnotationController::showWindow()
UBDrawingController::drawingController()->setStylusTool(mDesktopStylusTool);
#ifndef Q_WS_X11
#ifndef Q_OS_LINUX
mTransparentDrawingView->showFullScreen();
#else
// this is necessary to avoid unity to hide the panels
@ -341,7 +341,7 @@ void UBDesktopAnnotationController::showWindow()
mDesktopPalette->appear();
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
updateMask(true);
#endif
}
@ -375,18 +375,18 @@ void UBDesktopAnnotationController::updateBackground()
|| UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Selector)
{
newBrush = QBrush(Qt::transparent);
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
updateMask(true);
#endif
}
else
{
#if defined(Q_WS_MAC)
#if defined(Q_OS_OSX)
newBrush = QBrush(QColor(127, 127, 127, 15));
#else
newBrush = QBrush(QColor(127, 127, 127, 1));
#endif
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
updateMask(false);
#endif
}
@ -430,7 +430,7 @@ void UBDesktopAnnotationController::customCapture()
UBCustomCaptureWindow customCaptureWindow(mDesktopPalette);
// 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();
#endif
@ -901,7 +901,7 @@ void UBDesktopAnnotationController::updateMask(bool bTransparent)
p.drawRect(tabsPalette);
}
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
//Rquiered only for compiz wm
//TODO. Window manager detection screen

@ -171,7 +171,7 @@ void UBDesktopPalette::minimizeMe(eMinimizedLocation location)
adjustSizeAndPosition();
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
emit refreshMask();
#endif
}
@ -201,7 +201,7 @@ void UBDesktopPalette::maximizeMe()
// Notify that the maximization has been done
emit maximized();
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
emit refreshMask();
#endif
}

@ -55,7 +55,7 @@ class UBDesktopPalette : public UBActionPalette
void windowClick();
void screenClick();
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
void refreshMask();
#endif

@ -355,7 +355,7 @@ void UBDocumentController::setupViews()
}
}
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
mMainWindow->actionDelete->setShortcut(QKeySequence(Qt::Key_Backspace));
#endif
@ -394,7 +394,7 @@ void UBDocumentController::setupViews()
mDocumentUI->thumbnailWidget->setBackgroundBrush(UBSettings::documentViewLightColor);
#ifdef Q_WS_MACX
#ifdef Q_OS_OSX
mMessageWindow = new UBMessageWindow(NULL);
#else
mMessageWindow = new UBMessageWindow(mDocumentUI->thumbnailWidget);
@ -1452,7 +1452,7 @@ void UBDocumentController::showMessage(const QString& message, bool showSpinning
QRect newSize = mDocumentUI->thumbnailWidget->geometry();
#ifdef Q_WS_MACX
#ifdef Q_OS_OSX
QPoint point(newSize.left() + margin, newSize.bottom() - mMessageWindow->height() - margin);
mMessageWindow->move(mDocumentUI->thumbnailWidget->mapToGlobal(point));
#else

@ -771,7 +771,7 @@ void UBGraphicsItemDelegate::updateButtons(bool showUpdated)
qreal topXTitleBar = topX + (1.6 * mFrameWidth * mAntiScaleRatio);
qreal topYTitleBar = topY + frameButtonHeight *mAntiScaleRatio;
#ifndef Q_WS_X11
#ifndef Q_OS_LINUX
topYTitleBar += 5;
#endif

@ -57,7 +57,7 @@ UBFileSystemUtils::~UBFileSystemUtils()
QString UBFileSystemUtils::removeLocalFilePrefix(QString input)
{
#ifdef Q_WS_WIN
#ifdef Q_OS_WIN
if(input.startsWith("file:///"))
return input.mid(8);
else

@ -204,7 +204,7 @@ public:
static QString urlFromClipboard();
static QStringList availableTranslations();
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
static void SetMacLocaleByIdentifier(const QString& id);
#endif
};

@ -45,7 +45,7 @@
setStyleSheet(style);\
}
#ifdef Q_WS_WIN
#ifdef Q_OS_WIN
#define WARNINGS_DISABLE __pragma(warning(push, 0));
#define WARNINGS_ENABLE __pragma(warning(pop));
@ -58,7 +58,7 @@
#define THIRD_PARTY_WARNINGS_DISABLE __pragma(warning(push));
#endif //#ifdef NO_THIRD_PARTY_WARNINGS
#else //#ifdef Q_WS_WIN
#else //#ifdef Q_OS_WIN
#define WARNINGS_DISABLE _Pragma("GCC diagnostic push"); \
_Pragma("GCC diagnostic ignored \"-Wunused-parameter\""); \
@ -76,7 +76,7 @@ _Pragma("GCC diagnostic ignored \"-Wsign-compare\"");
#endif //#ifdef NO_THIRD_PARTY_WARNINGS
#endif //#ifdef Q_WS_WIN
#endif //#ifdef Q_OS_WIN
// anyway on any OS
#define THIRD_PARTY_WARNINGS_ENABLE WARNINGS_ENABLE

@ -54,11 +54,11 @@ UBFloatingPalette::UBFloatingPalette(Qt::Corner position, QWidget *parent)
{
// standalone window
// !!!! Should be included into Windows after QT recompilation
#ifndef Q_WS_WIN
#ifndef Q_OS_WIN
setAttribute(Qt::WA_TranslucentBackground);
setAttribute(Qt::WA_MacAlwaysShowToolWindow);
#endif
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
setAttribute(Qt::WA_MacAlwaysShowToolWindow);
setAttribute(Qt::WA_MacNonActivatingToolWindow);
setAttribute(Qt::WA_MacNoShadow);

@ -79,11 +79,11 @@ UBMagnifier::UBMagnifier(QWidget *parent, bool isInteractive)
{
// standalone window
// !!!! Should be included into Windows after QT recompilation
#ifndef Q_WS_WIN
#ifndef Q_OS_WIN
// setAttribute(Qt::WA_TranslucentBackground);
setAttribute(Qt::WA_MacAlwaysShowToolWindow);
#endif
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
setAttribute(Qt::WA_MacAlwaysShowToolWindow);
setAttribute(Qt::WA_MacNonActivatingToolWindow);
setAttribute(Qt::WA_MacNoShadow);

@ -36,7 +36,7 @@
#include "core/UBDisplayManager.h"
// 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"
#endif
@ -64,10 +64,10 @@ UBMainWindow::UBMainWindow(QWidget *parent, Qt::WindowFlags flags)
mStackedLayout = new QStackedLayout(centralWidget);
setCentralWidget(centralWidget);
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
actionPreferences->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Comma));
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));
// 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));
@ -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
#if defined(Q_WS_MACX)
#if defined(Q_OS_OSX)
bool UBMainWindow::event(QEvent *event)
{
bool bRes = QMainWindow::event(event);
@ -201,7 +201,7 @@ bool UBMainWindow::yesNoQuestion(QString windowTitle, QString text)
messageBox.addButton(tr("No"),QMessageBox::NoRole);
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 ...
messageBox.setWindowFlags(Qt::Dialog | Qt::X11BypassWindowManagerHint);
#else

@ -88,7 +88,7 @@ class UBMainWindow : public QMainWindow, public Ui::MainWindow
private:
// 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);
#endif
UBDownloadWidget* mpDownloadWidget;

@ -44,7 +44,7 @@ UBMessageWindow::UBMessageWindow(QWidget *parent)
mLayout->setContentsMargins(radius() + 15, 4, radius() + 15, 4);
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
mLayout->setContentsMargins(radius() + 15, 8, radius() + 15, 10);
#endif

@ -30,7 +30,7 @@
#include <QtGui>
#include <QStyleFactory>
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
#include <QtGui/QMacStyle>
#endif
@ -49,11 +49,11 @@ UBRubberBand::UBRubberBand(Shape s, QWidget * p)
{
customStyle = NULL;
#ifdef Q_WS_WIN
#ifdef Q_OS_WIN
customStyle = new QWindowsXPStyle();
#elif defined(Q_WS_MAC)
#elif defined(Q_OS_OSX)
customStyle = new QMacStyle();
#elif defined(Q_WS_X11)
#elif defined(Q_OS_LINUX)
customStyle = QStyleFactory::create("oxygen");
#endif

@ -33,7 +33,7 @@
#include "core/UBApplication.h"
#include "board/UBBoardController.h"
#if defined(Q_WS_MAC)
#if defined(Q_OS_OSX)
#include <ApplicationServices/ApplicationServices.h>
#endif

@ -246,7 +246,7 @@ void UBThumbnailWidget::mousePressEvent(QMouseEvent *event)
mLassoRectItem = new QGraphicsRectItem(0);
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
QColor strokeColor;
strokeColor.setHsvF(0, 0, 0.86, 1.0);

@ -56,10 +56,10 @@
#ifdef Q_WS_WIN
#ifdef Q_OS_WIN
#include "windowsmedia/UBWindowsMediaVideoEncoder.h"
#include "windowsmedia/UBWaveRecorder.h"
#elif defined(Q_WS_MAC)
#elif defined(Q_OS_OSX)
#include "quicktime/UBQuickTimeVideoEncoder.h"
#include "quicktime/UBAudioQueueRecorder.h"
#endif
@ -303,9 +303,9 @@ void UBPodcastController::start()
applicationMainModeChanged(UBApplication::applicationController->displayMode());
#ifdef Q_WS_WIN
#ifdef Q_OS_WIN
mVideoEncoder = new UBWindowsMediaVideoEncoder(this); //deleted on stop
#elif defined(Q_WS_MAC)
#elif defined(Q_OS_OSX)
mVideoEncoder = new UBQuickTimeVideoEncoder(this); //deleted on stop
#endif
@ -793,9 +793,9 @@ QStringList UBPodcastController::audioRecordingDevices()
{
QStringList devices;
#ifdef Q_WS_WIN
#ifdef Q_OS_WIN
devices = UBWaveRecorder::waveInDevices();
#elif defined(Q_WS_MAC)
#elif defined(Q_OS_OSX)
devices = UBAudioQueueRecorder::waveInDevices();
#endif

@ -641,7 +641,7 @@ void UBQuickTimeFile::appendAudioBuffer(void* pBuffer, long pLength, int inNumbe
}
}
}
#ifdef Q_WS_MACX
#ifdef Q_OS_OSX
free((void*)inPacketDescs);
#endif
}

@ -378,7 +378,7 @@ void UBGraphicsProtractor::paintGraduations(QPainter *painter)
const int oneDegreeGraduationLength = 5;
QFont font1 = painter->font();
#ifdef Q_WS_MAC
#ifdef Q_OS_OSX
font1.setPointSizeF(font1.pointSizeF() - 3);
#endif
QFontMetricsF fm1(font1);

@ -28,6 +28,7 @@
#include "UBTrapFlashController.h"
#include <QtXml>
#include <QWebFrame>
#include "frameworks/UBFileSystemUtils.h"
@ -99,22 +100,17 @@ void UBTrapFlashController::text_Changed(const QString &newText)
{
QString new_text = newText;
#ifdef Q_WS_WIN // Defined on Windows.
#ifdef Q_OS_WIN // Defined on Windows.
QString illegalCharList(" < > : \" / \\ | ? * ");
QRegExp regExp("[<>:\"/\\\\|?*]");
#endif
#ifdef Q_WS_QWS // Defined on Qt for Embedded Linux.
#ifdef Q_OS_OSX // Defined on Mac OS X.
QString illegalCharList(" < > : \" / \\ | ? * ");
QRegExp regExp("[<>:\"/\\\\|?*]");
#endif
#ifdef Q_WS_MAC // Defined on Mac OS X.
QString illegalCharList(" < > : \" / \\ | ? * ");
QRegExp regExp("[<>:\"/\\\\|?*]");
#endif
#ifdef Q_WS_X11 // Defined on X11.
#ifdef Q_OS_LINUX // Defined on X11.
QString illegalCharList(" < > : \" / \\ | ? * ");
QRegExp regExp("[<>:\"/\\\\|?*]");
#endif

@ -299,7 +299,7 @@ void UBWebController::setupPalettes()
{
mToolsCurrentPalette = new UBWebToolsPalette(UBApplication::mainWindow);
UBApplication::boardController->paletteManager()->setCurrentWebToolsPalette(mToolsCurrentPalette);
#ifndef Q_WS_WIN
#ifndef Q_OS_WIN
if (UBPlatformUtils::hasVirtualKeyboard() && UBApplication::boardController->paletteManager()->mKeyboardPalette)
connect(UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(closed()),
UBApplication::boardController->paletteManager()->mKeyboardPalette, SLOT(onDeactivated()));

@ -109,7 +109,7 @@ WBTabBar::WBTabBar(QWidget *parent)
setMovable(true);
setDocumentMode(false);
#ifdef Q_WS_MACX
#ifdef Q_OS_OSX
QFont baseFont = font();
baseFont.setPointSize(baseFont.pointSize() - 2);
setFont(baseFont);

@ -63,7 +63,7 @@ void WBWebTrapWebView::setIsTrapping(bool pIsTrapping)
mDomElementRect = QRect();
mCurrentContentType = Unknown;
/*
#if defined(Q_WS_WIN)
#if defined(Q_OS_WIN)
if(mIsTrapping)
{

Loading…
Cancel
Save