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(nextAction);
comicToolBar->addAction(goToPage);
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
comicToolBar->addSeparator();
comicToolBar->addAction(alwaysOnTopAction);
#else

View File

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

View File

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

View File

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

View File

@ -177,7 +177,7 @@ void LibraryCreator::create(QDir dir)
return;
QFileInfo fileInfo = list.at(i);
QString fileName = fileInfo.fileName();
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
QStringList src = _source.split("/");
QString filePath = fileInfo.absoluteFilePath();
QStringList fp = filePath.split("/");
@ -476,7 +476,7 @@ void ThumbnailCreator::create()
delete _7z;
attributes.clear();
_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
#else
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());
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
QProcess::startDetached("open", QStringList() << "-n" << QDir::cleanPath(QCoreApplication::applicationDirPath()+"/../../../YACReader.app") << "--args" << path);//,QStringList() << path);
//Comic is readed

View File

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

View File

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

View File

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