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:
@@ -27,7 +27,7 @@ Section::Section(int id, QString name): m_id(id), m_name(name)
|
||||
{
|
||||
}
|
||||
|
||||
bool Section::operator == (const Section §ion)
|
||||
bool Section::operator == (const Section §ion) const
|
||||
{
|
||||
return (this->m_name == section.m_name);
|
||||
}
|
||||
@@ -137,7 +137,7 @@ QString Section::name()
|
||||
|
||||
void Section::setFiles(QStringList localFiles, QStringList remoteFiles)
|
||||
{
|
||||
// qDebug() << "Section name: " << m_name.toAscii();
|
||||
// qDebug() << "Section name: " << m_name.toLocal8Bit();
|
||||
m_localFiles = localFiles;
|
||||
m_remoteFiles= remoteFiles;
|
||||
}
|
||||
@@ -178,9 +178,9 @@ void Section::getFilesAndPaths(QStringList &imagesList, QString &filesRemotePath
|
||||
*/
|
||||
void Section::getLocalAndRemoteFiles(QStringList &localFiles, QStringList &remoteFiles)
|
||||
{
|
||||
//qDebug() << "Section name: " << m_name.toAscii();
|
||||
//qDebug() << "Section name: " << m_name.toLocal8Bit();
|
||||
localFiles = m_localFiles;
|
||||
remoteFiles= m_remoteFiles;
|
||||
//qDebug() << "filename: " << m_localFiles[0].toAscii();
|
||||
//qDebug() << "filename: " << m_localFiles[0].toLocal8Bit();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user