r23388 by craig - clean up and use some newer Qt APIs
scribus-commit
scribus-commit at lists.scribus.net
Sat Nov 30 16:44:52 UTC 2019
Author: craig
Date: Sat Nov 30 16:44:52 2019
New Revision: 23388
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23388
Log:
clean up and use some newer Qt APIs
Modified:
trunk/Scribus/scribus/canvasmode_rotate.cpp
trunk/Scribus/scribus/iconmanager.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/ui/customfdialog.cpp
trunk/Scribus/scribus/ui/marksmanager.cpp
trunk/Scribus/scribus/ui/newdocdialog.cpp
trunk/Scribus/scribus/util_math.cpp
Modified: trunk/Scribus/scribus/canvasmode_rotate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23388&path=/trunk/Scribus/scribus/canvasmode_rotate.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_rotate.cpp Sat Nov 30 16:44:52 2019
@@ -496,7 +496,7 @@
if (e->modifiers() & Qt::ShiftModifier)
increment /= 10;
- if (increment = 0.0)
+ if (increment == 0.0)
return;
PageItem *currItem;
if (GetItem(&currItem))
Modified: trunk/Scribus/scribus/iconmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23388&path=/trunk/Scribus/scribus/iconmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/iconmanager.cpp (original)
+++ trunk/Scribus/scribus/iconmanager.cpp Sat Nov 30 16:44:52 2019
@@ -160,7 +160,7 @@
if ((av_fullver == curr_fullver) && !isd.variant.isEmpty())
continue;
m_backupSetBasename = m_activeSetBasename;
- m_backupSetVersion = m_backupSetVersion;
+// m_backupSetVersion = m_backupSetVersion;
m_activeSetBasename = isd.baseName;
m_activeSetVersion = isd.activeversion;
//qDebug()<<"backupSetBasename"<<m_backupSetBasename<<"activeSetBasename"<<m_activeSetBasename;
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23388&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sat Nov 30 16:44:52 2019
@@ -5174,7 +5174,6 @@
scrActions["editPaste"]->setEnabled(HaveDoc && (hasScribusData || textFrameEditMode || tableEditMode || hasExternalData));
}
-
void ScribusMainWindow::setCopyCutEnabled(bool b)
{
scrActions["editCut"]->setEnabled(b);
Modified: trunk/Scribus/scribus/ui/customfdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23388&path=/trunk/Scribus/scribus/ui/customfdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/customfdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/customfdialog.cpp Sat Nov 30 16:44:52 2019
@@ -483,7 +483,7 @@
connect(saveZip, SIGNAL(clicked()), this, SLOT(handleCompress()));
}
fileDialog->forceDoubleClickActivation(m_previewIsShown);
- fileDialog->setNameFilterDetailsVisible(false);
+ fileDialog->setOption(QFileDialog::HideNameFilterDetails, true);
m_extZip = "gz";
connect(okButton, SIGNAL(clicked()), this, SLOT(okClicked()));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
Modified: trunk/Scribus/scribus/ui/marksmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23388&path=/trunk/Scribus/scribus/ui/marksmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/marksmanager.cpp (original)
+++ trunk/Scribus/scribus/ui/marksmanager.cpp Sat Nov 30 16:44:52 2019
@@ -104,7 +104,7 @@
addListItem(MARK2MarkType, tr("Marks to Anchors"), m_Doc->marksList(), index);
addListItem(MARKNoteMasterType, tr("Notes marks"), m_Doc->marksList(), index);
// addListItem(MARKIndexType, tr("Index entries");, marks, index);
- listView->sortByColumn(0);
+ listView->sortByColumn(0, Qt::AscendingOrder);
}
restoreColaption();
m_Doc->flag_updateMarksLabels = false;
Modified: trunk/Scribus/scribus/ui/newdocdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23388&path=/trunk/Scribus/scribus/ui/newdocdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/newdocdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/newdocdialog.cpp Sat Nov 30 16:44:52 2019
@@ -367,7 +367,7 @@
fileDialog->setAcceptMode(QFileDialog::AcceptOpen);
fileDialog->setOption(QFileDialog::DontUseNativeDialog);
fileDialog->setIconProvider(new ImIconProvider());
- fileDialog->setNameFilterDetailsVisible(false);
+ fileDialog->setOption(QFileDialog::HideNameFilterDetails, true);
fileDialog->setReadOnly(true);
fileDialog->setSizeGripEnabled(false);
fileDialog->setModal(false);
Modified: trunk/Scribus/scribus/util_math.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23388&path=/trunk/Scribus/scribus/util_math.cpp
==============================================================================
--- trunk/Scribus/scribus/util_math.cpp (original)
+++ trunk/Scribus/scribus/util_math.cpp Sat Nov 30 16:44:52 2019
@@ -493,7 +493,7 @@
double getRotationFromMatrix(QTransform& matrix, double def)
{
double value = def;
- double norm = sqrt(fabs(matrix.det()));
+ double norm = sqrt(fabs(matrix.determinant()));
if (norm > 0.0000001)
{
double m11 = matrix.m11() / norm;
@@ -503,7 +503,7 @@
if (fabs(m11) <= 1.0 && fabs(m12) <= 1.0 && fabs(m21) <= 1.0 && fabs(m22) <= 1.0)
{
QTransform mat(m11, m12, m21, m22, 0, 0);
- if (abs(mat.det()-1.0) < 0.00001 && (mat.m12() == -mat.m21()))
+ if (abs(mat.determinant()-1.0) < 0.00001 && (mat.m12() == -mat.m21()))
{
double ac = acos(mat.m11());
value = (mat.m21() >= 0.0) ? ac : (-ac);
More information about the scribus-commit
mailing list