mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
- The user must now press 'y' to accept the legal notice in nox mode (other keys will refuse and stop the program). Thanks Mariusz Fik
This commit is contained in:
12
src/main.cpp
12
src/main.cpp
@@ -102,11 +102,13 @@ public:
|
|||||||
#ifdef DISABLE_GUI
|
#ifdef DISABLE_GUI
|
||||||
std::cout << std::endl << "*** " << tr("Legal Notice").toLocal8Bit().data() << " ***" << std::endl;
|
std::cout << std::endl << "*** " << tr("Legal Notice").toLocal8Bit().data() << " ***" << std::endl;
|
||||||
std::cout << 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.").toLocal8Bit().data() << std::endl << std::endl;
|
std::cout << 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.").toLocal8Bit().data() << std::endl << std::endl;
|
||||||
std::cout << tr("Press any key to accept and continue...").toLocal8Bit().data() << std::endl;
|
std::cout << tr("Press %1 key to accept and continue...").arg("'y'").toLocal8Bit().data() << std::endl;
|
||||||
getchar(); // Read pressed key
|
char ret = getchar(); // Read pressed key
|
||||||
// Save the answer
|
if(ret == 'y' || ret == 'Y') {
|
||||||
settings.setValue(QString::fromUtf8("LegalNotice/Accepted"), true);
|
// Save the answer
|
||||||
return true;
|
settings.setValue(QString::fromUtf8("LegalNotice/Accepted"), true);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
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.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."));
|
||||||
|
|||||||
Reference in New Issue
Block a user