diff --git a/Changelog b/Changelog index 7bb2a37c9..6478aa6fd 100644 --- a/Changelog +++ b/Changelog @@ -4,6 +4,7 @@ - BUGFIX: Fix ratio calculation for directly seeded torrents (Thanks phorane) - BUGFIX: Fix memory leak in RSS parser - BUGFIX: Only one log window can be opened at a time + - BUGFIX: Command-line parameters are no longer required to be in UTF-8 * Web Feb 10 2010 - Christophe Dumez - v2.1.5 - BUGFIX: Fix actions on selected torrents (non-selected torrents could be affected) diff --git a/src/GUI.cpp b/src/GUI.cpp index 436102b65..3dee22ef2 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -396,7 +396,7 @@ void GUI::readParamsOnSocket() { if(clientConnection) { QByteArray params = clientConnection->readAll(); if(!params.isEmpty()) { - processParams(QString::fromUtf8(params.data()).split(QString::fromUtf8("\n"))); + processParams(QString::fromLocal8Bit(params.constData()).split("\n")); qDebug("Received parameters from another instance"); } clientConnection->deleteLater(); diff --git a/src/main.cpp b/src/main.cpp index 866f6759f..6600a014c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #ifndef DISABLE_GUI #include @@ -112,7 +113,7 @@ public: msgBox.setText(tr("qBittorrent is a file sharing program. When you run a torrent, its data will be made available to others by means of upload. Any content you share is your sole responsibility.\n\nNo further notices will be issued.")); msgBox.setWindowTitle(tr("Legal notice")); msgBox.addButton(tr("Cancel"), QMessageBox::RejectRole); - QAbstractButton *agree_button =(QAbstractButton*)msgBox.addButton(tr("I Agree"), QMessageBox::AcceptRole); + QAbstractButton *agree_button =msgBox.addButton(tr("I Agree"), QMessageBox::AcceptRole); msgBox.exec(); if(msgBox.clickedButton() == agree_button) { // Save the answer @@ -255,12 +256,12 @@ int main(int argc, char *argv[]){ // Check for executable parameters if(argc > 1){ - if(QString::fromUtf8(argv[1]) == QString::fromUtf8("--version")){ + if(QString::fromLocal8Bit(argv[1]) == QString::fromUtf8("--version")){ std::cout << "qBittorrent " << VERSION << '\n'; delete app; return 0; } - if(QString::fromUtf8(argv[1]) == QString::fromUtf8("--help")){ + if(QString::fromLocal8Bit(argv[1]) == QString::fromUtf8("--help")){ UsageDisplay::displayUsage(argv[0]); delete app; return 0; @@ -268,11 +269,11 @@ int main(int argc, char *argv[]){ for(int i=1; i