Eliminado el uso de las macros Q_WS_*, en qt5 ya no est?n disponibles y es mejor usar Q_OS_* (Q_OS_LINUX, Q_OS_MAC, Q_OS_WIN32)

This commit is contained in:
Luis Ángel San Martín 2013-05-23 09:55:00 +02:00
parent f173981a9d
commit 87dbe7fabf
9 changed files with 15 additions and 15 deletions

View File

@ -312,7 +312,7 @@ void MainWindowViewer::createToolBars()
comicToolBar->addAction(prevAction); comicToolBar->addAction(prevAction);
comicToolBar->addAction(nextAction); comicToolBar->addAction(nextAction);
comicToolBar->addAction(goToPage); comicToolBar->addAction(goToPage);
#ifndef Q_WS_MAC #ifndef Q_OS_MAC
comicToolBar->addSeparator(); comicToolBar->addSeparator();
comicToolBar->addAction(alwaysOnTopAction); comicToolBar->addAction(alwaysOnTopAction);
#else #else

View File

@ -42,7 +42,7 @@ NotificationsLabelWidget::NotificationsLabelWidget(QWidget * parent)
textLabel->setAttribute(Qt::WA_LayoutUsesWidgetRect,true); textLabel->setAttribute(Qt::WA_LayoutUsesWidgetRect,true);
textLabel->setGeometry(imgLabel->geometry()); textLabel->setGeometry(imgLabel->geometry());
#ifndef Q_WS_MAC #ifndef Q_OS_MAC
imgLabel->setGraphicsEffect(effect); imgLabel->setGraphicsEffect(effect);
textLabel->setGraphicsEffect(effect2); textLabel->setGraphicsEffect(effect2);
#endif #endif

View File

@ -661,7 +661,7 @@ void Viewer::configureContent(QString msg)
void Viewer::hideCursor() void Viewer::hideCursor()
{ {
#ifdef Q_WS_MAC #ifdef Q_OS_MAC
setCursor(QCursor(QBitmap(1,1),QBitmap(1,1))); setCursor(QCursor(QBitmap(1,1),QBitmap(1,1)));
#else #else
setCursor(Qt::BlankCursor); setCursor(Qt::BlankCursor);

View File

@ -73,7 +73,7 @@ YACReaderActivityIndicatorWidget::YACReaderActivityIndicatorWidget(QWidget * par
animation2->setEndValue(1); animation2->setEndValue(1);
//animation2->setEasingCurve(QEasingCurve::InQuint); //animation2->setEasingCurve(QEasingCurve::InQuint);
#ifndef Q_WS_MAC #ifndef Q_OS_MAC
glow->setGraphicsEffect(effect); glow->setGraphicsEffect(effect);
#endif #endif

View File

@ -177,7 +177,7 @@ void LibraryCreator::create(QDir dir)
return; return;
QFileInfo fileInfo = list.at(i); QFileInfo fileInfo = list.at(i);
QString fileName = fileInfo.fileName(); QString fileName = fileInfo.fileName();
#ifdef Q_WS_MAC #ifdef Q_OS_MAC
QStringList src = _source.split("/"); QStringList src = _source.split("/");
QString filePath = fileInfo.absoluteFilePath(); QString filePath = fileInfo.absoluteFilePath();
QStringList fp = filePath.split("/"); QStringList fp = filePath.split("/");
@ -476,7 +476,7 @@ void ThumbnailCreator::create()
delete _7z; delete _7z;
attributes.clear(); attributes.clear();
_currentName = QDir::fromNativeSeparators(_currentName).split('/').last(); //separator fixed. _currentName = QDir::fromNativeSeparators(_currentName).split('/').last(); //separator fixed.
#ifdef Q_WS_WIN #ifdef Q_OS_WIN32
attributes << "e" << "-so" << "-r" << _fileSource << QString(_currentName.toLocal8Bit().constData()); //TODO platform dependency?? OEM 437 attributes << "e" << "-so" << "-r" << _fileSource << QString(_currentName.toLocal8Bit().constData()); //TODO platform dependency?? OEM 437
#else #else
attributes << "e" << "-so" << "-r" << _fileSource << _currentName; //TODO platform dependency?? OEM 437 attributes << "e" << "-so" << "-r" << _fileSource << _currentName; //TODO platform dependency?? OEM 437

View File

@ -965,7 +965,7 @@ void LibraryWindow::openComic()
{ {
QString path = currentPath() + dmCV->getComicPath(comicView->currentIndex()); QString path = currentPath() + dmCV->getComicPath(comicView->currentIndex());
#ifdef Q_WS_MAC #ifdef Q_OS_MAC
QProcess::startDetached("open", QStringList() << "-n" << QDir::cleanPath(QCoreApplication::applicationDirPath()+"/../../../YACReader.app") << "--args" << path);//,QStringList() << path); QProcess::startDetached("open", QStringList() << "-n" << QDir::cleanPath(QCoreApplication::applicationDirPath()+"/../../../YACReader.app") << "--args" << path);//,QStringList() << path);
//Comic is readed //Comic is readed

View File

@ -10,7 +10,7 @@
#include "startup.h" #include "startup.h"
#include "yacreader_global.h" #include "yacreader_global.h"
#ifndef Q_WS_WIN #ifndef Q_OS_WIN32
#include <sys/types.h> #include <sys/types.h>
#include <ifaddrs.h> #include <ifaddrs.h>
@ -190,7 +190,7 @@ void ServerConfigDialog::generateQR()
//} //}
ip->clear(); ip->clear();
QString dir; QString dir;
#ifdef Q_WS_WIN #ifdef Q_OS_WIN32
QList<QHostAddress> list = QHostInfo::fromName( QHostInfo::localHostName() ).addresses(); QList<QHostAddress> list = QHostInfo::fromName( QHostInfo::localHostName() ).addresses();
QList<QString> otherAddresses; QList<QString> otherAddresses;
@ -244,7 +244,7 @@ void ServerConfigDialog::generateQR()
} }
//qrCode->setText(dir+":8080"); //qrCode->setText(dir+":8080");
#ifdef Q_WS_MAC #ifdef Q_OS_MAC
ip->setFixedWidth(130); ip->setFixedWidth(130);
#endif #endif
} }

View File

@ -88,18 +88,18 @@ void HttpVersionChecker::httpRequestFinished(int requestId, bool error)
//TODO escribir prueba unitaria //TODO escribir prueba unitaria
bool HttpVersionChecker::checkNewVersion(QString sourceContent) bool HttpVersionChecker::checkNewVersion(QString sourceContent)
{ {
#ifdef Q_WS_WIN #ifdef Q_OS_WIN32
QRegExp rx(".*YACReader\\-([0-9]+).([0-9]+).([0-9]+)\\.?([0-9]+)?.{0,5}win32.*"); QRegExp rx(".*YACReader\\-([0-9]+).([0-9]+).([0-9]+)\\.?([0-9]+)?.{0,5}win32.*");
#endif #endif
#ifdef Q_WS_X11 #ifdef Q_OS_LINUX
QRegExp rx(".*YACReader\\-([0-9]+).([0-9]+).([0-9]+)\\.?([0-9]+)?.{0,5}X11.*"); QRegExp rx(".*YACReader\\-([0-9]+).([0-9]+).([0-9]+)\\.?([0-9]+)?.{0,5}X11.*");
#endif #endif
#ifdef Q_WS_MAC #ifdef Q_OS_MAC
QRegExp rx(".*YACReader\\-([0-9]+).([0-9]+).([0-9]+)\\.?([0-9]+)?.{0,5}Mac.*"); QRegExp rx(".*YACReader\\-([0-9]+).([0-9]+).([0-9]+)\\.?([0-9]+)?.{0,5}Mac.*");
#endif #endif
int index = 0; int index = 0;
bool newVersion = false; bool newVersion = false;
bool sameVersion = true; bool sameVersion = true;

View File

@ -4,7 +4,7 @@
#include <QtOpenGL> #include <QtOpenGL>
//#include <math.h> //#include <math.h>
#ifdef Q_WS_MAC #ifdef Q_OS_MAC
#include <OpenGL/glu.h> #include <OpenGL/glu.h>
#else #else
#include <GL/glu.h> #include <GL/glu.h>