r24843 by craig - Qt6: Build fixes, update QfileDialog usage

scribus-commit scribus-commit at lists.scribus.net
Sat Jan 29 23:12:48 UTC 2022


Author: craig
Date: Sat Jan 29 23:12:48 2022
New Revision: 24843

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24843
Log:
Qt6: Build fixes, update QfileDialog usage

Modified:
    trunk/Scribus/scribus/scimagestructs.cpp
    trunk/Scribus/scribus/storyloader.cpp
    trunk/Scribus/scribus/ui/customfdialog.cpp
    trunk/Scribus/scribus/ui/prefs_hyphenator.cpp

Modified: trunk/Scribus/scribus/scimagestructs.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24843&path=/trunk/Scribus/scribus/scimagestructs.cpp
==============================================================================
--- trunk/Scribus/scribus/scimagestructs.cpp	(original)
+++ trunk/Scribus/scribus/scimagestructs.cpp	Sat Jan 29 23:12:48 2022
@@ -10,6 +10,7 @@
 
 #include <QByteArray>
 #include <QDataStream>
+#include <QIODevice>
 
 #define SC_DEBUG_FILE defined(DEBUG_SCIMAGECACHE)
 #include "scdebug.h"

Modified: trunk/Scribus/scribus/storyloader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24843&path=/trunk/Scribus/scribus/storyloader.cpp
==============================================================================
--- trunk/Scribus/scribus/storyloader.cpp	(original)
+++ trunk/Scribus/scribus/storyloader.cpp	Sat Jan 29 23:12:48 2022
@@ -12,7 +12,6 @@
 #include <QCheckBox>
 #include <QCursor>
 #include <QDir>
-#include <QDomElement>
 #include <QFile>
 #include <QFileInfo>
 #include <QList>
@@ -200,4 +199,4 @@
 			return true;
 	}
 	return false;
-}
+}

Modified: trunk/Scribus/scribus/ui/customfdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24843&path=/trunk/Scribus/scribus/ui/customfdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/customfdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/customfdialog.cpp	Sat Jan 29 23:12:48 2022
@@ -130,14 +130,14 @@
 
 void FDialogPreview::genPreview(const QString& name)
 {
+	if (name.isEmpty())
+		return;
+	QFileInfo fi(name);
+	if (fi.isDir())
+		return;
 	QPixmap pm;
 	QString Buffer;
 	updatePix();
-	if (name.isEmpty())
-		return;
-	QFileInfo fi(name);
-	if (fi.isDir())
-		return;
 	int w = pixmap().width();
 	int h = pixmap().height();
 	bool mode = false;
@@ -357,6 +357,7 @@
 		Layout1C->addItem( spacer2 );
 		vboxLayout->addWidget(LayoutC);
 		fileDialog->setFileMode(QFileDialog::Directory);
+		fileDialog->setOption(QFileDialog::ShowDirsOnly, true);
 		fileDialog->forceDoubleClickActivation(false);
 		filePreview->hide();
 		showPreview->setVisible(false);
@@ -386,7 +387,7 @@
 			if (flags & fdCompressFile)
 				vboxLayout->addWidget(Layout);
 		}
-		
+		fileDialog->setOption(QFileDialog::ShowDirsOnly, false);
 		if (saveZip != nullptr)
 			saveZip->setToolTip( "<qt>" + tr( "Compress the Scribus document on save" ) + "</qt>");
 		if (withFonts != nullptr)

Modified: trunk/Scribus/scribus/ui/prefs_hyphenator.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24843&path=/trunk/Scribus/scribus/ui/prefs_hyphenator.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_hyphenator.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_hyphenator.cpp	Sat Jan 29 23:12:48 2022
@@ -6,7 +6,6 @@
 */
 
 #include <QDebug>
-#include <QDomDocument>
 #include <QInputDialog>
 #include <QListWidget>
 #include <QTableWidgetItem>




More information about the scribus-commit mailing list