mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
use "%" for string-concatenation
Qt-Docs says it's less memory-usage...
This commit is contained in:
@@ -132,7 +132,7 @@ void myMessageOutput(QtMsgType type,
|
||||
void delete_old_log_files(int days)
|
||||
{
|
||||
const QDate today = QDate::currentDate();
|
||||
const QString path = QETApp::dataDir() + "/";
|
||||
const QString path = QETApp::dataDir() % "/";
|
||||
|
||||
QString filter("%1%1%1%1%1%1%1%1.log"); // pattern
|
||||
filter = filter.arg("[0123456789]"); // valid characters
|
||||
@@ -148,7 +148,7 @@ void delete_old_log_files(int days)
|
||||
QDir deletefile;
|
||||
deletefile.setPath(filepath);
|
||||
deletefile.remove(filepath);
|
||||
qDebug() << "File " + filepath + " is deleted!";
|
||||
qDebug() << "File " % filepath % " is deleted!";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user