#5389 Added Qt5 compatibility for default file paths

This commit is contained in:
Andrew Nelless 2016-06-23 12:05:27 +01:00 committed by Jerry (Xinyu Hou)
parent 64dbae8918
commit 79a61b28f4
1 changed files with 4 additions and 0 deletions

View File

@ -1256,8 +1256,12 @@ void MainWindow::downloadBonjour()
void MainWindow::installBonjour()
{
#if defined(Q_OS_WIN)
#if QT_VERSION >= 0x050000
QString tempLocation = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
#else
QString tempLocation = QDesktopServices::storageLocation(
QDesktopServices::TempLocation);
#endif
QString filename = tempLocation;
filename.append("\\").append(bonjourTargetFilename);
QFile file(filename);