mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30: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/>.
|
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 "qetproject.h"
|
||||||
#include "diagram.h"
|
#include "diagram.h"
|
||||||
@@ -37,6 +32,13 @@
|
|||||||
#include "numerotationcontextcommands.h"
|
#include "numerotationcontextcommands.h"
|
||||||
#include "assignvariables.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
|
static int BACKUP_INTERVAL = 120000; //interval in ms of backup = 2min
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1691,11 +1693,16 @@ NamesList QETProject::namesListForIntegrationCategory()
|
|||||||
*/
|
*/
|
||||||
void QETProject::writeBackup()
|
void QETProject::writeBackup()
|
||||||
{
|
{
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
|
||||||
QDomDocument xml_project(toXml());
|
QDomDocument xml_project(toXml());
|
||||||
QtConcurrent::run(QET::writeToFile,
|
QtConcurrent::run(
|
||||||
xml_project,
|
QET::writeToFile,xml_project,&m_backup_file,nullptr);
|
||||||
&m_backup_file,
|
#else
|
||||||
nullptr);
|
#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