Merge pull request #6445 from Chocobo1/fix

Follow http user-agent format
This commit is contained in:
sledgehammer999
2017-03-07 23:38:14 +02:00
committed by GitHub
14 changed files with 41 additions and 36 deletions

View File

@@ -127,7 +127,7 @@ Application::Application(const QString &id, int &argc, char **argv)
if (isFileLoggerEnabled())
m_fileLogger = new FileLogger(fileLoggerPath(), isFileLoggerBackup(), fileLoggerMaxSize(), isFileLoggerDeleteOld(), fileLoggerAge(), static_cast<FileLogger::FileLogAgeType>(fileLoggerAgeType()));
Logger::instance()->addMessage(tr("qBittorrent %1 started", "qBittorrent v3.2.0alpha started").arg(VERSION));
Logger::instance()->addMessage(tr("qBittorrent %1 started", "qBittorrent v3.2.0alpha started").arg(QBT_VERSION));
}
#ifndef DISABLE_GUI

View File

@@ -189,7 +189,7 @@ int main(int argc, char *argv[])
}
// Set environment variable
if (!qputenv("QBITTORRENT", QByteArray(VERSION)))
if (!qputenv("QBITTORRENT", QBT_VERSION))
std::cerr << "Couldn't set environment variable...\n";
#ifndef DISABLE_GUI
@@ -359,7 +359,7 @@ void sigAbnormalHandler(int signum)
const char str1[] = "\n\n*************************************************************\nCatching signal: ";
const char *sigName = sysSigName[signum];
const char str2[] = "\nPlease file a bug report at http://bug.qbittorrent.org and provide the following information:\n\n"
"qBittorrent version: " VERSION "\n";
"qBittorrent version: " QBT_VERSION "\n";
write(STDERR_FILENO, str1, strlen(str1));
write(STDERR_FILENO, sigName, strlen(sigName));
write(STDERR_FILENO, str2, strlen(str2));
@@ -380,7 +380,7 @@ void showSplashScreen()
{
QPixmap splash_img(":/icons/skin/splash.png");
QPainter painter(&splash_img);
QString version = VERSION;
QString version = QBT_VERSION;
painter.setPen(QPen(Qt::white));
painter.setFont(QFont("Arial", 22, QFont::Black));
painter.drawText(224 - painter.fontMetrics().width(version), 270, version);
@@ -393,7 +393,7 @@ void showSplashScreen()
void displayVersion()
{
std::cout << qPrintable(qApp->applicationName()) << " " << VERSION << std::endl;
std::cout << qPrintable(qApp->applicationName()) << " " << QBT_VERSION << std::endl;
}
QString makeUsage(const QString &prg_name)

View File

@@ -60,7 +60,7 @@ public:
"</p></font>"
"<br/><hr><br/>"
"<p align=center><font size=4>"
"qBittorrent version: " VERSION "<br/>"
"qBittorrent version: " QBT_VERSION "<br/>"
"Libtorrent version: %1<br/>"
"Qt version: " QT_VERSION_STR "<br/>"
"Boost version: %2<br/>"