diff --git a/TODO b/TODO index 4d3e8f1e0..39c042db1 100644 --- a/TODO +++ b/TODO @@ -36,7 +36,7 @@ - Use a QListWidget to allow multiple input paths - Possibility to add url seeds - Add IPv6 support (at least start working on it, libtorrent seems to support it, we should limit our code to IPv4 anymore) -- UPnP support (debug, sync with next aMule release (or CVS)) : seems to be working! +- UPnP support (debug, sync with next aMule release) : seems to be working! - Update v0.9.0 changelog after its release - Display Url seeds in torrent properties and allow to edit them - Improve Ipfilter.dat parser (move to a thread ? - too slow to load qBT and more importantly options) diff --git a/src/main.cpp b/src/main.cpp index 0b9ee3af7..5db3c3fee 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -35,7 +35,6 @@ #ifdef Q_WS_WIN #include #endif - #ifdef Q_WS_MAC #include #endif diff --git a/src/options.ui b/src/options.ui index a3858eba8..723d3ea32 100644 --- a/src/options.ui +++ b/src/options.ui @@ -1600,7 +1600,7 @@ false - WindowsXP style (WIndows XP only) + WindowsXP style (Windows XP only) diff --git a/src/options_imp.cpp b/src/options_imp.cpp index dd30a6ec3..6a0ae12b2 100644 --- a/src/options_imp.cpp +++ b/src/options_imp.cpp @@ -23,7 +23,19 @@ #include #include #include +#include #include +#include +#include +#include +#include +#ifdef Q_WS_WIN + #include +#endif + +#ifdef Q_WS_MAC + #include +#endif #include "options_imp.h" #include "misc.h" @@ -193,8 +205,39 @@ options_imp::~options_imp(){ qDebug("-> destructing Options"); } +void options_imp::useStyle(){ + QString style = getStyle(); + if(style == "Cleanlooks"){ + QApplication::setStyle(new QCleanlooksStyle()); + return; + } + if(style == "Motif"){ + QApplication::setStyle(new QMotifStyle()); + return; + } + if(style == "CDE"){ + QApplication::setStyle(new QCDEStyle()); + return; + } +#ifdef Q_WS_MAC + if(style == "MacOS"){ + QApplication::setStyle(new QMacStyle()); + return; + } +#endif +#ifdef Q_WS_WIN + if(style == "WinXP"){ + QApplication::setStyle(new QWindowsXPStyle()); + return; + } +#endif + QApplication::setStyle(new QPlastiqueStyle()); +} + void options_imp::saveOptions(){ QSettings settings("qBittorrent", "qBittorrent"); + // Apply style + useStyle(); // Check if min port < max port checkPortsLogic(); settings.beginGroup("Options"); diff --git a/src/options_imp.h b/src/options_imp.h index a9057a49d..aefebd638 100644 --- a/src/options_imp.h +++ b/src/options_imp.h @@ -112,6 +112,7 @@ class options_imp : public QDialog, private Ui::Dialog{ public slots: void setLocale(QString locale); + void useStyle(); signals: void status_changed(const QString&, bool) const;