Major port Qt4 to Qt6
- Updated header inclusions from QtGui to QtWidgets for consistency and compatibility with Qt 5 and later. - Replaced deprecated QApplication::desktop() with QApplication::primaryScreen() for obtaining screen DPI. - Modified MyOutputHandler to use QMessageLogContext and QString for improved logging. - Changed QMatrix to QTransform for image rotation in ImageCutout class. - Updated various debug statements to use toLocal8Bit() instead of toAscii() for better string handling. - Refactored several classes to use QElapsedTimer instead of QTime for performance measurement. - Ensured all operator overloads in Section and Tag classes are marked as const for better const-correctness.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "imageoutputformatdialog.h"
|
||||
#include "ui_imageoutputformatdialog.h"
|
||||
#include <QRegularExpression>
|
||||
|
||||
ImageOutputFormatDialog::ImageOutputFormatDialog(QWidget *parent, QStringList list, bool keeppagenumber, int startpagenumber) :
|
||||
QDialog(parent),
|
||||
@@ -19,7 +20,7 @@ ImageOutputFormatDialog::ImageOutputFormatDialog(QWidget *parent, QStringList li
|
||||
{
|
||||
QString name = list[i];
|
||||
//the newName value will be stripped down from all NON numeric character, and will output the name in the format dddd.jpg, where d is digit (0-9)
|
||||
QString destinationName = QString("%1.jpg").arg(name.remove(QRegExp("[^\\d]")), 4, QChar('0'));
|
||||
QString destinationName = QString("%1.jpg").arg(name.remove(QRegularExpression("[^\\d]")), 4, QChar('0'));
|
||||
outputFileNames << destinationName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#ifndef IMAGEOUTPUTFORMATDIALOG_H
|
||||
#define IMAGEOUTPUTFORMATDIALOG_H
|
||||
|
||||
#include <QtGui/QDialog>
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class ImageOutputFormatDialog;
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
//! \brief the implementation of the class
|
||||
#include <QtGui>
|
||||
#include <QtGlobal> //Q_WS_WIN
|
||||
#include <QCompleter>
|
||||
#include <QFileDialog>
|
||||
|
||||
#include "importerdialog.h"
|
||||
#include "imageoutputformatdialog.h"
|
||||
@@ -621,7 +623,7 @@ void ImporterDialog::updateDatabase()
|
||||
queryMaster.bindValue(":id", id_publication_issue);
|
||||
if( !queryMaster.exec() )
|
||||
{
|
||||
qDebug() << "update publication issue: " << queryMaster.lastQuery().toAscii();
|
||||
qDebug() << "update publication issue: " << queryMaster.lastQuery().toLocal8Bit();
|
||||
qDebug() << "user id: " << m_user.id();
|
||||
}
|
||||
|
||||
@@ -660,7 +662,7 @@ void ImporterDialog::updateDatabase()
|
||||
if( !queryMaster.exec())
|
||||
{
|
||||
QMessageBox::critical(this, tr("SQL Error"), queryMaster.lastError().databaseText());
|
||||
qDebug() << "issue_sections insert query error: " << queryMaster.lastQuery().toAscii();
|
||||
qDebug() << "issue_sections insert query error: " << queryMaster.lastQuery().toLocal8Bit();
|
||||
ui->importButton->setEnabled(true);
|
||||
setEnabled(true);
|
||||
return;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#ifndef IMPORTERDIALOG_H
|
||||
#define IMPORTERDIALOG_H
|
||||
|
||||
#include <QtGui/QDialog>
|
||||
#include <QDialog>
|
||||
#include <QtSql>
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
Reference in New Issue
Block a user