Correct compile errorswith Qt6.7

This commit is contained in:
Lord-Grey
2023-09-09 22:10:22 +02:00
parent 013587d1fd
commit a2f6271832
17 changed files with 57 additions and 49 deletions

View File

@@ -57,9 +57,9 @@ void showHelp(Option & option){
int getInstaneIdbyName(const QJsonObject & reply, const QString & name){
if(reply.contains("instance")){
QJsonArray list = reply.value("instance").toArray();
const QJsonArray list = reply.value("instance").toArray();
for ( const auto &entry : qAsConst(list) ) {
for ( const auto &entry : list ) {
const QJsonObject obj = entry.toObject();
if(obj["friendly_name"] == name && obj["running"].toBool())
{

View File

@@ -268,9 +268,9 @@ int main(int argc, char** argv)
if (directory.exists() && destDir.exists())
{
std::cout << "Extract to folder: " << destDir.absolutePath().toStdString() << std::endl;
QStringList filenames = directory.entryList(QStringList() << "*", QDir::Files, QDir::Name | QDir::IgnoreCase);
const QStringList filenames = directory.entryList(QStringList() << "*", QDir::Files, QDir::Name | QDir::IgnoreCase);
QString destFileName;
for (const QString & filename : qAsConst(filenames))
for (const QString & filename : filenames)
{
destFileName = destDir.dirName()+"/"+filename;
if (QFile::exists(destFileName))