diff options
-rw-r--r-- | rbutil/rbutilqt/autodetection.h | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/encoders.cpp | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/encoders.h | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/installbootloader.cpp | 6 | ||||
-rw-r--r-- | rbutil/rbutilqt/installbootloader.h | 4 | ||||
-rw-r--r-- | rbutil/rbutilqt/installzip.cpp | 4 | ||||
-rw-r--r-- | rbutil/rbutilqt/installzip.h | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/irivertools/irivertools.h | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/irivertools/md5sum.h | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/main.cpp | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/progressloggerinterface.h | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbsettings.cpp | 4 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbsettings.h | 15 | ||||
-rw-r--r-- | rbutil/rbutilqt/talkfile.cpp | 8 | ||||
-rw-r--r-- | rbutil/rbutilqt/talkfile.h | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/tts.h | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/voicefile.cpp | 10 | ||||
-rw-r--r-- | rbutil/rbutilqt/voicefile.h | 2 |
18 files changed, 37 insertions, 36 deletions
diff --git a/rbutil/rbutilqt/autodetection.h b/rbutil/rbutilqt/autodetection.h index a620b69566..ec89dbf6cd 100644 --- a/rbutil/rbutilqt/autodetection.h +++ b/rbutil/rbutilqt/autodetection.h @@ -21,7 +21,7 @@ #ifndef AUTODETECTION_H_ #define AUTODETECTION_H_ -#include <QtGui> +#include <QtCore> extern "C" { // Ipodpatcher diff --git a/rbutil/rbutilqt/encoders.cpp b/rbutil/rbutilqt/encoders.cpp index 47e39e87e8..0077263df0 100644 --- a/rbutil/rbutilqt/encoders.cpp +++ b/rbutil/rbutilqt/encoders.cpp @@ -18,10 +18,10 @@ ****************************************************************************/ #include "encoders.h" -#include "browsedirtree.h" #ifndef CONSOLE #include "encodersgui.h" +#include "browsedirtree.h" #else #include "encodersguicli.h" #endif diff --git a/rbutil/rbutilqt/encoders.h b/rbutil/rbutilqt/encoders.h index 239ca3df79..8e91e6e149 100644 --- a/rbutil/rbutilqt/encoders.h +++ b/rbutil/rbutilqt/encoders.h @@ -20,7 +20,7 @@ #ifndef ENCODERS_H #define ENCODERS_H -#include <QtGui> +#include <QtCore> #include "rbsettings.h" diff --git a/rbutil/rbutilqt/installbootloader.cpp b/rbutil/rbutilqt/installbootloader.cpp index f55b73a7d5..7c6867ecbd 100644 --- a/rbutil/rbutilqt/installbootloader.cpp +++ b/rbutil/rbutilqt/installbootloader.cpp @@ -198,7 +198,7 @@ bool BootloaderInstaller::downloadInfo() infoDownloaded=false; infoError = false; while(!infoDownloaded ) - QApplication::processEvents(); + QCoreApplication::processEvents(); return !infoError; } @@ -222,8 +222,10 @@ void BootloaderInstaller::infoRequestFinished(int id, bool error) QString errorString; errorString = tr("Network error: %1. Please check your network and proxy settings.") .arg(infodownloader->errorString()); +#ifndef CONSOLE if(error) QMessageBox::about(NULL, "Network Error", errorString); - qDebug() << "downloadDone:" << id << error; +#endif + qDebug() << "downloadDone:" << id << error; infoError = true; infoDownloaded = true; diff --git a/rbutil/rbutilqt/installbootloader.h b/rbutil/rbutilqt/installbootloader.h index 03b715c15e..69757c5fc8 100644 --- a/rbutil/rbutilqt/installbootloader.h +++ b/rbutil/rbutilqt/installbootloader.h @@ -20,7 +20,11 @@ #ifndef INSTALLBOOTLOADER_H #define INSTALLBOOTLOADER_H +#ifndef CONSOLE #include <QtGui> +#else +#include <QtCore> +#endif #include "progressloggerinterface.h" #include "httpget.h" diff --git a/rbutil/rbutilqt/installzip.cpp b/rbutil/rbutilqt/installzip.cpp index 874417dc9a..641b057175 100644 --- a/rbutil/rbutilqt/installzip.cpp +++ b/rbutil/rbutilqt/installzip.cpp @@ -126,13 +126,13 @@ void ZipInstaller::downloadDone(bool error) return; } else m_dp->addItem(tr("Download finished."),LOGOK); - QApplication::processEvents(); + QCoreApplication::processEvents(); if(m_unzip) { // unzip downloaded file qDebug() << "about to unzip the downloaded file" << m_file << "to" << m_mountpoint; m_dp->addItem(tr("Extracting file."),LOGINFO); - QApplication::processEvents(); + QCoreApplication::processEvents(); qDebug() << "file to unzip: " << m_file; UnZip::ErrorCode ec; diff --git a/rbutil/rbutilqt/installzip.h b/rbutil/rbutilqt/installzip.h index 8100dee2b4..906fc21013 100644 --- a/rbutil/rbutilqt/installzip.h +++ b/rbutil/rbutilqt/installzip.h @@ -23,7 +23,7 @@ -#include <QtGui> +#include <QtCore> #include <QtNetwork> #include "progressloggerinterface.h" diff --git a/rbutil/rbutilqt/irivertools/irivertools.h b/rbutil/rbutilqt/irivertools/irivertools.h index b1fce826c1..d0d1de6730 100644 --- a/rbutil/rbutilqt/irivertools/irivertools.h +++ b/rbutil/rbutilqt/irivertools/irivertools.h @@ -22,7 +22,7 @@ #ifndef IRIVERTOOLS_H_INCLUDED #define IRIVERTOOLS_H_INCLUDED -#include <QtGui> +#include <QtCore> #include "md5sum.h" #include "progressloggerinterface.h" diff --git a/rbutil/rbutilqt/irivertools/md5sum.h b/rbutil/rbutilqt/irivertools/md5sum.h index ed22bdbb49..a24c1a3989 100644 --- a/rbutil/rbutilqt/irivertools/md5sum.h +++ b/rbutil/rbutilqt/irivertools/md5sum.h @@ -31,7 +31,7 @@ #define uint32 unsigned long int #endif -#include <QtGui> +#include <QtCore> typedef struct { diff --git a/rbutil/rbutilqt/main.cpp b/rbutil/rbutilqt/main.cpp index 4928c51d89..b8419c00a3 100644 --- a/rbutil/rbutilqt/main.cpp +++ b/rbutil/rbutilqt/main.cpp @@ -29,7 +29,7 @@ Q_IMPORT_PLUGIN(qtaccessiblewidgets) int main( int argc, char ** argv ) { QApplication app( argc, argv ); - QString absolutePath = qApp->applicationDirPath(); + QString absolutePath = QCoreApplication::instance()->applicationDirPath(); // portable installation: // check for a configuration file in the program folder. QSettings *user; diff --git a/rbutil/rbutilqt/progressloggerinterface.h b/rbutil/rbutilqt/progressloggerinterface.h index 2f593540fe..a6ec9fb748 100644 --- a/rbutil/rbutilqt/progressloggerinterface.h +++ b/rbutil/rbutilqt/progressloggerinterface.h @@ -20,7 +20,7 @@ #ifndef PROGRESSLOGGERINTERFACE_H #define PROGRESSLOGGERINTERFACE_H -#include <QtGui> +#include <QtCore> enum { LOGNOICON, LOGOK, LOGINFO, LOGWARNING, LOGERROR diff --git a/rbutil/rbutilqt/rbsettings.cpp b/rbutil/rbutilqt/rbsettings.cpp index 51f7057cc2..6e3e63110e 100644 --- a/rbutil/rbutilqt/rbsettings.cpp +++ b/rbutil/rbutilqt/rbsettings.cpp @@ -28,10 +28,10 @@ void RbSettings::open() // portable installation: // check for a configuration file in the program folder. QFileInfo config; - config.setFile(qApp->applicationDirPath() + "/RockboxUtility.ini"); + config.setFile(QCoreApplication::instance()->applicationDirPath() + "/RockboxUtility.ini"); if(config.isFile()) { - userSettings = new QSettings(qApp->applicationDirPath() + "/RockboxUtility.ini", + userSettings = new QSettings(QCoreApplication::instance()->applicationDirPath() + "/RockboxUtility.ini", QSettings::IniFormat, this); qDebug() << "config: portable"; } diff --git a/rbutil/rbutilqt/rbsettings.h b/rbutil/rbutilqt/rbsettings.h index 29aa9e8a1d..ad94c63801 100644 --- a/rbutil/rbutilqt/rbsettings.h +++ b/rbutil/rbutilqt/rbsettings.h @@ -20,7 +20,8 @@ #ifndef RBSETTINGS_H #define RBSETTINGS_H -#include <QtGui> +#include <QtCore> + class QSettings; class RbSettings : public QObject @@ -79,7 +80,7 @@ class RbSettings : public QObject QString name(QString plattform); QString brand(QString plattform); QStringList allLanguages(); - + bool curNeedsBootloader(); QString curBrand(); QString curName(); @@ -94,9 +95,7 @@ class RbSettings : public QObject QString curTTS(); QString curResolution(); int curTargetId(); - - - + void setOfPath(QString path); void setCachePath(QString path); void setBuild(QString build); @@ -123,11 +122,7 @@ class RbSettings : public QObject void setEncoderComplexity(QString enc, int c); void setEncoderVolume(QString enc,double v); void setEncoderNarrowband(QString enc,bool nb); - - - - - + private: QSettings *devices; QSettings *userSettings; diff --git a/rbutil/rbutilqt/talkfile.cpp b/rbutil/rbutilqt/talkfile.cpp index 478e9ea19a..3b4e82caf6 100644 --- a/rbutil/rbutilqt/talkfile.cpp +++ b/rbutil/rbutilqt/talkfile.cpp @@ -55,7 +55,7 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger) return false; } - QApplication::processEvents(); + QCoreApplication::processEvents(); connect(logger,SIGNAL(aborted()),this,SLOT(abort())); m_logger->setProgressMax(0); @@ -78,7 +78,7 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger) return false; } - QApplication::processEvents(); + QCoreApplication::processEvents(); QFileInfo fileInf = it.fileInfo(); QString toSpeak; QString filename; @@ -144,7 +144,7 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger) return false; } - QApplication::processEvents(); + QCoreApplication::processEvents(); } m_logger->addItem(tr("Encoding of %1").arg(toSpeak),LOGINFO); if(!m_enc->encode(wavfilename,filename)) @@ -156,7 +156,7 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger) return false; } - QApplication::processEvents(); + QCoreApplication::processEvents(); } //! remove the intermedia wav file, if requested diff --git a/rbutil/rbutilqt/talkfile.h b/rbutil/rbutilqt/talkfile.h index f3c0c54ce7..8341da4ca9 100644 --- a/rbutil/rbutilqt/talkfile.h +++ b/rbutil/rbutilqt/talkfile.h @@ -21,7 +21,7 @@ #ifndef TALKFILE_H #define TALKFILE_H -#include <QtGui> +#include <QtCore> #include "progressloggerinterface.h" #include "encoders.h" diff --git a/rbutil/rbutilqt/tts.h b/rbutil/rbutilqt/tts.h index eb5bbb731a..1addbe2ebb 100644 --- a/rbutil/rbutilqt/tts.h +++ b/rbutil/rbutilqt/tts.h @@ -23,7 +23,7 @@ #include "rbsettings.h" -#include <QtGui> +#include <QtCore> #ifndef CONSOLE #include "ttsgui.h" diff --git a/rbutil/rbutilqt/voicefile.cpp b/rbutil/rbutilqt/voicefile.cpp index 42902b93d8..290c298c26 100644 --- a/rbutil/rbutilqt/voicefile.cpp +++ b/rbutil/rbutilqt/voicefile.cpp @@ -126,7 +126,7 @@ void VoiceFileCreator::downloadDone(bool error) return; } else m_logger->addItem(tr("Download finished."),LOGOK); - QApplication::processEvents(); + QCoreApplication::processEvents(); m_logger->setProgressMax(0); @@ -167,7 +167,7 @@ void VoiceFileCreator::downloadDone(bool error) return; } - QApplication::processEvents(); + QCoreApplication::processEvents(); connect(m_logger,SIGNAL(aborted()),this,SLOT(abort())); //read in downloaded file @@ -242,8 +242,8 @@ void VoiceFileCreator::downloadDone(bool error) { if(toSpeak == "") continue; - m_logger->addItem(tr("creating ")+toSpeak,LOGINFO); - QApplication::processEvents(); + m_logger->addItem(tr("creating ")+toSpeak,LOGINFO); + QCoreApplication::processEvents(); m_tts->voice(toSpeak,wavname); // generate wav } @@ -257,7 +257,7 @@ void VoiceFileCreator::downloadDone(bool error) // remove the wav file QFile::remove(wavname); // remember the mp3 file for later removing - mp3files << encodedname; + mp3files << encodedname; } diff --git a/rbutil/rbutilqt/voicefile.h b/rbutil/rbutilqt/voicefile.h index 55b2184c3f..fb567b32de 100644 --- a/rbutil/rbutilqt/voicefile.h +++ b/rbutil/rbutilqt/voicefile.h @@ -21,7 +21,7 @@ #ifndef VOICEFILE_H #define VOICEFILE_H -#include <QtGui> +#include <QtCore> #include "progressloggerinterface.h" #include "encoders.h" |