diff --git a/Changelog b/Changelog index 8154fbdb9..c9c564b2f 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,7 @@ - I18N: Updated Arabic translation - I18N: Fixes to German translation - BUGFIX: Save path can now be edited in torrent addition dialog + - BUGFIX: Fix save path encoding on non-utf8 systems - BUGFIX: OGV can now be previewed - BUGFIX: Maximum download limit is now 10MB/s - BUGFIX: Fix 'download in scan dir' persistence @@ -11,6 +12,7 @@ - BUGFIX: Fix Web UI for spanish users - BUGFIX: Fix locale switching from Web UI - BUGFIX: Use AND operator for torrentdownloads.net searches + - COSMETIC: Fix progress bars style on Windows * Tue Aug 24 2010 - Christophe Dumez - v2.4.0 - FEATURE: Added actions to "Move to top/bottom" of priority queue diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index a62d560bc..d6d848900 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -867,13 +867,13 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) { qDebug("addMagnetURI: Temp folder is enabled."); qDebug("addTorrent::Temp folder is enabled."); QString torrent_tmp_path = defaultTempPath.replace("\\", "/"); - p.save_path = torrent_tmp_path.toLocal8Bit().constData(); + p.save_path = torrent_tmp_path.toUtf8().constData(); // Check if save path exists, creating it otherwise if(!QDir(torrent_tmp_path).exists()) QDir().mkpath(torrent_tmp_path); qDebug("addMagnetURI: using save_path: %s", qPrintable(torrent_tmp_path)); } else { - p.save_path = savePath.toLocal8Bit().constData(); + p.save_path = savePath.toUtf8().constData(); // Check if save path exists, creating it otherwise if(!QDir(savePath).exists()) QDir().mkpath(savePath); @@ -1121,13 +1121,13 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr if(!torrent_tmp_path.endsWith("/")) torrent_tmp_path += "/"; torrent_tmp_path += root_folder; } - p.save_path = torrent_tmp_path.toLocal8Bit().constData(); + p.save_path = torrent_tmp_path.toUtf8().constData(); // Check if save path exists, creating it otherwise if(!QDir(torrent_tmp_path).exists()) QDir().mkpath(torrent_tmp_path); qDebug("addTorrent: using save_path: %s", qPrintable(torrent_tmp_path)); } else { - p.save_path = savePath.toLocal8Bit().constData(); + p.save_path = savePath.toUtf8().constData(); // Check if save path exists, creating it otherwise if(!QDir(savePath).exists()) QDir().mkpath(savePath); diff --git a/src/proplistdelegate.h b/src/proplistdelegate.h index 6d419dbc0..8aeef057f 100644 --- a/src/proplistdelegate.h +++ b/src/proplistdelegate.h @@ -43,6 +43,10 @@ #include "misc.h" #include "propertieswidget.h" +#ifdef Q_WS_WIN +#include +#endif + // Defines for properties list columns enum PropColumn {NAME, PCSIZE, PROGRESS, PRIORITY}; @@ -79,7 +83,13 @@ public: newopt.minimum = 0; newopt.state |= QStyle::State_Enabled; newopt.textVisible = true; +#ifndef Q_WS_WIN QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt, painter); +#else + // XXX: To avoid having the progress text on the right of the bar + QPlastiqueStyle st; + st.drawControl(QStyle::CE_ProgressBar, &newopt, painter, 0); +#endif break; } case PRIORITY: { diff --git a/src/qtorrenthandle.cpp b/src/qtorrenthandle.cpp index 682131206..1c149d5ed 100644 --- a/src/qtorrenthandle.cpp +++ b/src/qtorrenthandle.cpp @@ -227,7 +227,7 @@ int QTorrentHandle::num_incomplete() const { QString QTorrentHandle::save_path() const { Q_ASSERT(h.is_valid()); - return misc::toQString(h.save_path().string()).replace("\\", "/"); + return misc::toQStringU(h.save_path().string()).replace("\\", "/"); } #if LIBTORRENT_VERSION_MINOR > 14 diff --git a/src/transferlistdelegate.h b/src/transferlistdelegate.h index 172ff79e2..3319defca 100644 --- a/src/transferlistdelegate.h +++ b/src/transferlistdelegate.h @@ -41,6 +41,10 @@ #include #include "misc.h" +#ifdef Q_WS_WIN + #include +#endif + // Defines for download list list columns enum TorrentState {STATE_DOWNLOADING, STATE_STALLED_DL, STATE_STALLED_UP, STATE_SEEDING, STATE_PAUSED_DL, STATE_PAUSED_UP, STATE_QUEUED_DL, STATE_QUEUED_UP, STATE_CHECKING_UP, STATE_CHECKING_DL, STATE_INVALID}; enum Column {TR_NAME, TR_PRIORITY, TR_SIZE, TR_PROGRESS, TR_STATUS, TR_SEEDS, TR_PEERS, TR_DLSPEED, TR_UPSPEED, TR_ETA, TR_RATIO, TR_LABEL, TR_ADD_DATE, TR_SEED_DATE, TR_DLLIMIT, TR_UPLIMIT, TR_HASH}; @@ -167,7 +171,13 @@ public: newopt.minimum = 0; newopt.state |= QStyle::State_Enabled; newopt.textVisible = true; +#ifndef Q_WS_WIN QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt, painter); +#else + // XXX: To avoid having the progress text on the right of the bar + QPlastiqueStyle st; + st.drawControl(QStyle::CE_ProgressBar, &newopt, painter, 0); +#endif break; } default: