mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
QT6: Todo Fix QtConcurrent (remove KCoreAddons?)
This commit is contained in:
@@ -16,11 +16,6 @@
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <QTimer>
|
||||
#include <QStandardPaths>
|
||||
#include <utility>
|
||||
#include <QtConcurrent>
|
||||
#include <QHash>
|
||||
|
||||
#include "qetproject.h"
|
||||
#include "diagram.h"
|
||||
@@ -37,6 +32,13 @@
|
||||
#include "numerotationcontextcommands.h"
|
||||
#include "assignvariables.h"
|
||||
|
||||
#include <QTimer>
|
||||
#include <QStandardPaths>
|
||||
#include <utility>
|
||||
#include <QtConcurrent>
|
||||
#include <QHash>
|
||||
#include <QtDebug>
|
||||
|
||||
static int BACKUP_INTERVAL = 120000; //interval in ms of backup = 2min
|
||||
|
||||
/**
|
||||
@@ -1691,11 +1693,16 @@ NamesList QETProject::namesListForIntegrationCategory()
|
||||
*/
|
||||
void QETProject::writeBackup()
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
|
||||
QDomDocument xml_project(toXml());
|
||||
QtConcurrent::run(QET::writeToFile,
|
||||
xml_project,
|
||||
&m_backup_file,
|
||||
nullptr);
|
||||
QtConcurrent::run(
|
||||
QET::writeToFile,xml_project,&m_backup_file,nullptr);
|
||||
#else
|
||||
#if TODO_LIST
|
||||
#pragma message("@TODO remove code for QT 6 or later")
|
||||
#endif
|
||||
qDebug()<<"Help code for QT 6 or later";
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user