r24137 by craig - Code clean up, cost iterators, qobject_cast instead of dynamic_cast where possible
scribus-commit
scribus-commit at lists.scribus.net
Sat Oct 31 22:47:39 UTC 2020
Author: craig
Date: Sat Oct 31 22:47:39 2020
New Revision: 24137
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24137
Log:
Code clean up, cost iterators, qobject_cast instead of dynamic_cast where possible
Modified:
trunk/Scribus/scribus/filesearch.cpp
trunk/Scribus/scribus/langmgr.cpp
trunk/Scribus/scribus/pdflib_core.cpp
trunk/Scribus/scribus/pluginmanager.cpp
trunk/Scribus/scribus/plugins/barcodegenerator/barcode.cpp
trunk/Scribus/scribus/plugins/colorwheel/colorwheel.cpp
trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp
trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
trunk/Scribus/scribus/plugins/fontpreview/fontpreviewplugin.cpp
trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.cpp
trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.h
trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp
trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp
trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp
trunk/Scribus/scribus/plugins/import/emf/importemfplugin.cpp
trunk/Scribus/scribus/plugins/import/fh/importfhplugin.cpp
trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp
trunk/Scribus/scribus/plugins/import/odg/importodgplugin.cpp
trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
trunk/Scribus/scribus/plugins/import/pages/importpagesplugin.cpp
trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
trunk/Scribus/scribus/plugins/import/pm/importpmplugin.cpp
trunk/Scribus/scribus/plugins/import/pub/importpubplugin.cpp
trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp
trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp
trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
trunk/Scribus/scribus/plugins/import/svm/importsvmplugin.cpp
trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp
trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp
trunk/Scribus/scribus/plugins/import/vsd/importvsdplugin.cpp
trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp
trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp
trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
trunk/Scribus/scribus/plugins/import/xps/importxpsplugin.cpp
trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp
trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp
trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp
trunk/Scribus/scribus/plugins/shapes/shapeplugin.cpp
trunk/Scribus/scribus/plugins/short-words/shortwords.cpp
trunk/Scribus/scribus/plugins/tools/flattenpath/flattenpath.cpp
trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellplugin.cpp
trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp
trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp
trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp
trunk/Scribus/scribus/plugins/tools/smoothpath/smoothpath.cpp
trunk/Scribus/scribus/plugins/tools/subdivide/subdivide.cpp
trunk/Scribus/scribus/scprintengine_pdf.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/scribusview.cpp
trunk/Scribus/scribus/text/boxes.cpp
trunk/Scribus/scribus/text/textlayout.cpp
trunk/Scribus/scribus/ui/about.cpp
trunk/Scribus/scribus/ui/colorcombo.cpp
trunk/Scribus/scribus/ui/colorlistbox.cpp
trunk/Scribus/scribus/ui/contextmenu.cpp
trunk/Scribus/scribus/ui/fontcombo.cpp
trunk/Scribus/scribus/ui/latexeditor.cpp
trunk/Scribus/scribus/ui/outputpreview_pdf.cpp
trunk/Scribus/scribus/ui/picsearchoptions.cpp
trunk/Scribus/scribus/ui/preferencesdialog.cpp
trunk/Scribus/scribus/ui/preferencesdialog.h
trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
trunk/Scribus/scribus/ui/prefs_plugins.cpp
trunk/Scribus/scribus/ui/proptree.cpp
trunk/Scribus/scribus/ui/scdockpalette.cpp
trunk/Scribus/scribus/ui/scmenu.cpp
trunk/Scribus/scribus/ui/scrspinbox.cpp
trunk/Scribus/scribus/ui/search.cpp
trunk/Scribus/scribus/ui/smcstylewidget.cpp
trunk/Scribus/scribus/ui/storyeditor.cpp
trunk/Scribus/scribus/ui/storyeditor.h
trunk/Scribus/scribus/ui/stylecombos.cpp
trunk/Scribus/scribus/ui/stylemanager.cpp
trunk/Scribus/scribus/ui/symbolpalette.h
Modified: trunk/Scribus/scribus/filesearch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/filesearch.cpp
==============================================================================
--- trunk/Scribus/scribus/filesearch.cpp (original)
+++ trunk/Scribus/scribus/filesearch.cpp Sat Oct 31 22:47:39 2020
@@ -86,7 +86,7 @@
// while ( *(m_iter.top()) == "." || *(m_iter.top()) == ".." )
// ++m_iter.top();
- if ( (m_iter.top() == m_tree.top().end()) || (m_depth == m_maxdepth) )
+ if ( (m_iter.top() == m_tree.top().constEnd()) || (m_depth == m_maxdepth) )
{
// We're at the end of the list of subdirectory names in this directory,
// or we've hit the maximum depth we're allowed to search to.
@@ -129,7 +129,7 @@
void FileSearch::pushStack()
{
m_tree.push(m_dir.entryList(QDir::Dirs|QDir::NoSymLinks|QDir::NoDotAndDotDot));
- m_iter.push(m_tree.top().begin());
+ m_iter.push(m_tree.top().constBegin());
}
void FileSearch::addCurrentDirFiles()
Modified: trunk/Scribus/scribus/langmgr.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/langmgr.cpp
==============================================================================
--- trunk/Scribus/scribus/langmgr.cpp (original)
+++ trunk/Scribus/scribus/langmgr.cpp Sat Oct 31 22:47:39 2020
@@ -411,7 +411,7 @@
m_langTable.append(LangDef("mak", "", "Makasar", QObject::tr("Makasar")));
m_langTable.append(LangDef("vmw", "", "Makhuwa", QObject::tr("Makhuwa")));
m_langTable.append(LangDef("kde", "", "Makonde", QObject::tr("Makonde")));
- m_langTable.append(LangDef("ms", "", "Malay", QObject::tr("Malay")));
+ m_langTable.append(LangDef("ms", "ms_MY", "Malay", QObject::tr("Malay")));
m_langTable.append(LangDef("mg", "", "Malagasy", QObject::tr("Malagasy")));
m_langTable.append(LangDef("ml", "ml_IN", "Malayalam", QObject::tr("Malayalam")));
m_langTable.append(LangDef("dv", "", "Maldivian", QObject::tr("Maldivian")));
Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Sat Oct 31 22:47:39 2020
@@ -2400,7 +2400,7 @@
if ((fformat == ScFace::SFNT || fformat == ScFace::TTCF))
{
QMap<uint, FPointArray>::const_iterator it;
- for (it = usedGlyphs.begin(); it != usedGlyphs.end(); ++it)
+ for (it = usedGlyphs.constBegin(); it != usedGlyphs.constEnd(); ++it)
{
int glyphIndex = it.key();
hasNeededGlyphNames &= gl.contains(glyphIndex);
@@ -8950,7 +8950,7 @@
double y = ActPageP->height() - (ite->yPos() - ActPageP->yOffset());
double x2 = x+ite->width();
double y2 = y-ite->height();
- QString bmUtf16("");
+ QString bmUtf16;
if (!((ite->itemText.length() == 1) && (ite->itemText.text(0, 1) == QChar(13))))
{
// #6823 EncStringUTF16() perform the string encoding by its own
Modified: trunk/Scribus/scribus/pluginmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/pluginmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/pluginmanager.cpp (original)
+++ trunk/Scribus/scribus/pluginmanager.cpp Sat Oct 31 22:47:39 2020
@@ -255,7 +255,7 @@
}
else if (pda.plugin->inherits("ScPersistentPlugin"))
{
- ScPersistentPlugin* plugin = dynamic_cast<ScPersistentPlugin*>(pda.plugin);
+ ScPersistentPlugin* plugin = qobject_cast<ScPersistentPlugin*>(pda.plugin);
assert(plugin);
pda.enabled = plugin->initPlugin();
if (!pda.enabled)
@@ -284,7 +284,7 @@
{
//Add in ScrAction based plugin linkage
//Insert DLL Action into Dictionary with values from plugin interface
- plugin = dynamic_cast<ScActionPlugin*>(it.value().plugin);
+ plugin = qobject_cast<ScActionPlugin*>(it.value().plugin);
assert(plugin);
ScActionPlugin::ActionInfo ai(plugin->actionInfo());
ScrAction* action = new ScrAction(ScrAction::ActionDLL, ai.iconPath1, ai.iconPath2, ai.text, ai.keySequence, mw);
@@ -385,7 +385,7 @@
{
//Add in ScrAction based plugin linkage
//Insert DLL Action into Dictionary with values from plugin interface
- plugin = dynamic_cast<ScActionPlugin*>(it.value().plugin);
+ plugin = qobject_cast<ScActionPlugin*>(it.value().plugin);
assert(plugin);
ScActionPlugin::ActionInfo ai(plugin->actionInfo());
if (ai.enabledForStoryEditor)
@@ -443,7 +443,7 @@
{
if (it.value().plugin->inherits("ScActionPlugin"))
{
- plugin = dynamic_cast<ScActionPlugin*>(it.value().plugin);
+ plugin = qobject_cast<ScActionPlugin*>(it.value().plugin);
assert(plugin);
ScActionPlugin::ActionInfo ai(plugin->actionInfo());
if (mw->scrActions.contains(ai.name))
@@ -473,7 +473,7 @@
{
if (!it.value().plugin->inherits("ScActionPlugin"))
continue;
- actionPlug = dynamic_cast<ScActionPlugin*>(it.value().plugin);
+ actionPlug = qobject_cast<ScActionPlugin*>(it.value().plugin);
if (!actionPlug)
continue;
@@ -589,7 +589,7 @@
Q_ASSERT(pda.plugin);
if (pda.plugin->inherits("ScActionPlugin"))
{
- ScActionPlugin* plugin = dynamic_cast<ScActionPlugin*>(pda.plugin);
+ ScActionPlugin* plugin = qobject_cast<ScActionPlugin*>(pda.plugin);
assert(plugin);
plugin->cleanupPlugin();
// FIXME: Correct way to delete action?
@@ -597,7 +597,7 @@
}
else if (pda.plugin->inherits("ScPersistentPlugin"))
{
- ScPersistentPlugin* plugin = dynamic_cast<ScPersistentPlugin*>(pda.plugin);
+ ScPersistentPlugin* plugin = qobject_cast<ScPersistentPlugin*>(pda.plugin);
assert(plugin);
plugin->cleanupPlugin();
}
@@ -660,7 +660,7 @@
if (plugin)
{
plugin->languageChange();
- ixplug = dynamic_cast<ScActionPlugin*>(plugin);
+ ixplug = qobject_cast<ScActionPlugin*>(plugin);
if (ixplug)
{
ScActionPlugin::ActionInfo ai(ixplug->actionInfo());
Modified: trunk/Scribus/scribus/plugins/barcodegenerator/barcode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/barcodegenerator/barcode.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/barcodegenerator/barcode.cpp (original)
+++ trunk/Scribus/scribus/plugins/barcodegenerator/barcode.cpp Sat Oct 31 22:47:39 2020
@@ -103,7 +103,7 @@
void barcodegenerator_freePlugin(ScPlugin* plugin)
{
- Barcode* plug = dynamic_cast<Barcode*>(plugin);
+ Barcode* plug = qobject_cast<Barcode*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/colorwheel/colorwheel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/colorwheel/colorwheel.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/colorwheel/colorwheel.cpp (original)
+++ trunk/Scribus/scribus/plugins/colorwheel/colorwheel.cpp Sat Oct 31 22:47:39 2020
@@ -24,7 +24,7 @@
void colorwheel_freePlugin(ScPlugin* plugin)
{
- auto* plug = dynamic_cast<ColorWheelPlugin*>(plugin);
+ auto* plug = qobject_cast<ColorWheelPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp Sat Oct 31 22:47:39 2020
@@ -72,7 +72,7 @@
void svgexplugin_freePlugin(ScPlugin* plugin)
{
- SVGExportPlugin* plug = dynamic_cast<SVGExportPlugin*>(plugin);
+ SVGExportPlugin* plug = qobject_cast<SVGExportPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp Sat Oct 31 22:47:39 2020
@@ -75,7 +75,7 @@
void xpsexplugin_freePlugin(ScPlugin* plugin)
{
- XPSExportPlugin* plug = dynamic_cast<XPSExportPlugin*>(plugin);
+ XPSExportPlugin* plug = qobject_cast<XPSExportPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp Sat Oct 31 22:47:39 2020
@@ -105,7 +105,7 @@
void scribus12format_freePlugin(ScPlugin* plugin)
{
- Scribus12Format* plug = dynamic_cast<Scribus12Format*>(plugin);
+ Scribus12Format* plug = qobject_cast<Scribus12Format*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Sat Oct 31 22:47:39 2020
@@ -812,7 +812,7 @@
void scribus134format_freePlugin(ScPlugin* plugin)
{
- Scribus134Format* plug = dynamic_cast<Scribus134Format*>(plugin);
+ Scribus134Format* plug = qobject_cast<Scribus134Format*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp Sat Oct 31 22:47:39 2020
@@ -1218,7 +1218,7 @@
void scribus13format_freePlugin(ScPlugin* plugin)
{
- Scribus13Format* plug = dynamic_cast<Scribus13Format*>(plugin);
+ Scribus13Format* plug = qobject_cast<Scribus13Format*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Sat Oct 31 22:47:39 2020
@@ -2084,7 +2084,7 @@
void scribus150format_freePlugin(ScPlugin* plugin)
{
- Scribus150Format* plug = dynamic_cast<Scribus150Format*>(plugin);
+ Scribus150Format* plug = qobject_cast<Scribus150Format*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Sat Oct 31 22:47:39 2020
@@ -175,7 +175,7 @@
docu.writeEndElement();
docu.writeEndDocument();
bool writeSucceed = false;
- const QFile* qFile = dynamic_cast<QFile*>(outputFile.data());
+ const QFile* qFile = qobject_cast<QFile*>(outputFile.data());
writeSucceed = (qFile->error() == QFile::NoError);
outputFile->close();
return writeSucceed;
@@ -454,7 +454,7 @@
docu.writeEndDocument();
bool writeSucceed = false;
- const QFile* qFile = dynamic_cast<QFile*>(outputFile.data());
+ const QFile* qFile = qobject_cast<QFile*>(outputFile.data());
if (qFile)
writeSucceed = (qFile->error() == QFile::NoError);
else
Modified: trunk/Scribus/scribus/plugins/fontpreview/fontpreviewplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/fontpreview/fontpreviewplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fontpreview/fontpreviewplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/fontpreview/fontpreviewplugin.cpp Sat Oct 31 22:47:39 2020
@@ -25,7 +25,7 @@
void fontpreview_freePlugin(ScPlugin* plugin)
{
- FontPreviewPlugin* plug = dynamic_cast<FontPreviewPlugin*>(plugin);
+ FontPreviewPlugin* plug = qobject_cast<FontPreviewPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp (original)
+++ trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp Sat Oct 31 22:47:39 2020
@@ -164,16 +164,17 @@
{
currentStyle = nullptr;
for (int i = 0; i < attrs.count(); ++i)
- if (attrs.localName(i) == "style:family")
- if (attrs.value(i) == "paragraph")
- {
- gtParagraphStyle* pstyle = new gtParagraphStyle(writer->getDefaultStyle()->asGtParagraphStyle());
- pstyle->setDefaultStyle(true);
- currentStyle = dynamic_cast<gtStyle*>(pstyle);
- currentStyle->setName("default-style");
- readProperties = true;
- defaultStyleCreated = true;
- }
+ {
+ if (attrs.localName(i) == "style:family" && attrs.value(i) == "paragraph")
+ {
+ gtParagraphStyle* pstyle = new gtParagraphStyle(writer->getDefaultStyle()->asGtParagraphStyle());
+ pstyle->setDefaultStyle(true);
+ currentStyle = dynamic_cast<gtStyle*>(pstyle);
+ currentStyle->setName("default-style");
+ readProperties = true;
+ defaultStyleCreated = true;
+ }
+ }
}
void StyleReader::styleProperties(const QXmlAttributes& attrs)
Modified: trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.cpp (original)
+++ trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.cpp Sat Oct 31 22:47:39 2020
@@ -93,6 +93,8 @@
ScZipHandler* fun = new ScZipHandler();
if (fun->open(fileName))
{
+ const QString STYLE = "styles.xml";
+ const QString CONTENT = "content.xml";
QTemporaryDir *dir = new QTemporaryDir();
QString baseDir = dir->path();
fun->extract(STYLE, baseDir, ScZipHandler::SkipPaths);
Modified: trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.h
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.h (original)
+++ trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.h Sat Oct 31 22:47:39 2020
@@ -38,23 +38,20 @@
extern "C" PLUGIN_API QStringList FileExtensions();
-const QString STYLE = "styles.xml";
-const QString CONTENT = "content.xml";
-
class SxwIm
{
-public:
- SxwIm(const QString& fileName, const QString& encoding, gtWriter* w, bool textOnly);
- ~SxwIm();
+ public:
+ SxwIm(const QString& fileName, const QString& encoding, gtWriter* w, bool textOnly);
+ ~SxwIm();
-private:
- gtWriter* writer { nullptr };
- QString encoding;
- QString filename;
- QString stylePath;
- QString contentPath;
+ private:
+ gtWriter* writer { nullptr };
+ QString encoding;
+ QString filename;
+ QString stylePath;
+ QString contentPath;
- bool decompress();
+ bool decompress();
};
#endif // SXWIM_H
Modified: trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp Sat Oct 31 22:47:39 2020
@@ -40,7 +40,7 @@
void importai_freePlugin(ScPlugin* plugin)
{
- ImportAIPlugin* plug = dynamic_cast<ImportAIPlugin*>(plugin);
+ ImportAIPlugin* plug = qobject_cast<ImportAIPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp Sat Oct 31 22:47:39 2020
@@ -36,7 +36,7 @@
void importcdr_freePlugin(ScPlugin* plugin)
{
- ImportCdrPlugin* plug = dynamic_cast<ImportCdrPlugin*>(plugin);
+ ImportCdrPlugin* plug = qobject_cast<ImportCdrPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp Sat Oct 31 22:47:39 2020
@@ -41,7 +41,7 @@
void importcgm_freePlugin(ScPlugin* plugin)
{
- ImportCgmPlugin* plug = dynamic_cast<ImportCgmPlugin*>(plugin);
+ ImportCgmPlugin* plug = qobject_cast<ImportCgmPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp Sat Oct 31 22:47:39 2020
@@ -34,7 +34,7 @@
void importcvg_freePlugin(ScPlugin* plugin)
{
- ImportCvgPlugin* plug = dynamic_cast<ImportCvgPlugin*>(plugin);
+ ImportCvgPlugin* plug = qobject_cast<ImportCvgPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp Sat Oct 31 22:47:39 2020
@@ -41,7 +41,7 @@
void importdrw_freePlugin(ScPlugin* plugin)
{
- ImportDrwPlugin* plug = dynamic_cast<ImportDrwPlugin*>(plugin);
+ ImportDrwPlugin* plug = qobject_cast<ImportDrwPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/emf/importemfplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/emf/importemfplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/emf/importemfplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/emf/importemfplugin.cpp Sat Oct 31 22:47:39 2020
@@ -40,7 +40,7 @@
void importemf_freePlugin(ScPlugin* plugin)
{
- ImportEmfPlugin* plug = dynamic_cast<ImportEmfPlugin*>(plugin);
+ ImportEmfPlugin* plug = qobject_cast<ImportEmfPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/fh/importfhplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/fh/importfhplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/fh/importfhplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/fh/importfhplugin.cpp Sat Oct 31 22:47:39 2020
@@ -34,7 +34,7 @@
void importfh_freePlugin(ScPlugin* plugin)
{
- ImportFhPlugin* plug = dynamic_cast<ImportFhPlugin*>(plugin);
+ ImportFhPlugin* plug = qobject_cast<ImportFhPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp Sat Oct 31 22:47:39 2020
@@ -40,7 +40,7 @@
void importidml_freePlugin(ScPlugin* plugin)
{
- ImportIdmlPlugin* plug = dynamic_cast<ImportIdmlPlugin*>(plugin);
+ ImportIdmlPlugin* plug = qobject_cast<ImportIdmlPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/odg/importodgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/odg/importodgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/odg/importodgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/odg/importodgplugin.cpp Sat Oct 31 22:47:39 2020
@@ -40,7 +40,7 @@
void importodg_freePlugin(ScPlugin* plugin)
{
- ImportOdgPlugin* plug = dynamic_cast<ImportOdgPlugin*>(plugin);
+ ImportOdgPlugin* plug = qobject_cast<ImportOdgPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp Sat Oct 31 22:47:39 2020
@@ -66,7 +66,7 @@
void oodrawimp_freePlugin(ScPlugin* plugin)
{
- OODrawImportPlugin* plug = dynamic_cast<OODrawImportPlugin*>(plugin);
+ OODrawImportPlugin* plug = qobject_cast<OODrawImportPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/pages/importpagesplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/pages/importpagesplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pages/importpagesplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pages/importpagesplugin.cpp Sat Oct 31 22:47:39 2020
@@ -40,7 +40,7 @@
void importpages_freePlugin(ScPlugin* plugin)
{
- ImportPagesPlugin* plug = dynamic_cast<ImportPagesPlugin*>(plugin);
+ ImportPagesPlugin* plug = qobject_cast<ImportPagesPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp Sat Oct 31 22:47:39 2020
@@ -34,7 +34,7 @@
void importpct_freePlugin(ScPlugin* plugin)
{
- ImportPctPlugin* plug = dynamic_cast<ImportPctPlugin*>(plugin);
+ ImportPctPlugin* plug = qobject_cast<ImportPctPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp Sat Oct 31 22:47:39 2020
@@ -40,7 +40,7 @@
void importpdf_freePlugin(ScPlugin* plugin)
{
- ImportPdfPlugin* plug = dynamic_cast<ImportPdfPlugin*>(plugin);
+ ImportPdfPlugin* plug = qobject_cast<ImportPdfPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/pm/importpmplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/pm/importpmplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pm/importpmplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pm/importpmplugin.cpp Sat Oct 31 22:47:39 2020
@@ -34,7 +34,7 @@
void importpm_freePlugin(ScPlugin* plugin)
{
- ImportPmPlugin* plug = dynamic_cast<ImportPmPlugin*>(plugin);
+ ImportPmPlugin* plug = qobject_cast<ImportPmPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/pub/importpubplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/pub/importpubplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pub/importpubplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pub/importpubplugin.cpp Sat Oct 31 22:47:39 2020
@@ -34,7 +34,7 @@
void importpub_freePlugin(ScPlugin* plugin)
{
- ImportPubPlugin* plug = dynamic_cast<ImportPubPlugin*>(plugin);
+ ImportPubPlugin* plug = qobject_cast<ImportPubPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp Sat Oct 31 22:47:39 2020
@@ -34,7 +34,7 @@
void importshape_freePlugin(ScPlugin* plugin)
{
- ImportShapePlugin* plug = dynamic_cast<ImportShapePlugin*>(plugin);
+ ImportShapePlugin* plug = qobject_cast<ImportShapePlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp Sat Oct 31 22:47:39 2020
@@ -34,7 +34,7 @@
void importsml_freePlugin(ScPlugin* plugin)
{
- ImportSmlPlugin* plug = dynamic_cast<ImportSmlPlugin*>(plugin);
+ ImportSmlPlugin* plug = qobject_cast<ImportSmlPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp Sat Oct 31 22:47:39 2020
@@ -66,7 +66,7 @@
void svgimplugin_freePlugin(ScPlugin* plugin)
{
- SVGImportPlugin* plug = dynamic_cast<SVGImportPlugin*>(plugin);
+ SVGImportPlugin* plug = qobject_cast<SVGImportPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
@@ -2094,7 +2094,7 @@
{
bool doBreak = false;
setupNode(e);
- QDomNode c = e.firstChild();
+// QDomNode c = e.firstChild();
for (QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling())
{
if (n.isElement() && (parseTagName(n.toElement()) == "tspan"))
Modified: trunk/Scribus/scribus/plugins/import/svm/importsvmplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/svm/importsvmplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svm/importsvmplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/svm/importsvmplugin.cpp Sat Oct 31 22:47:39 2020
@@ -40,7 +40,7 @@
void importsvm_freePlugin(ScPlugin* plugin)
{
- ImportSvmPlugin* plug = dynamic_cast<ImportSvmPlugin*>(plugin);
+ ImportSvmPlugin* plug = qobject_cast<ImportSvmPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp Sat Oct 31 22:47:39 2020
@@ -45,7 +45,7 @@
void uniconvertorplugin_freePlugin(ScPlugin* plugin)
{
- UniconvImportPlugin* plug = dynamic_cast<UniconvImportPlugin*>(plugin);
+ UniconvImportPlugin* plug = qobject_cast<UniconvImportPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp Sat Oct 31 22:47:39 2020
@@ -40,7 +40,7 @@
void importviva_freePlugin(ScPlugin* plugin)
{
- ImportVivaPlugin* plug = dynamic_cast<ImportVivaPlugin*>(plugin);
+ ImportVivaPlugin* plug = qobject_cast<ImportVivaPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/vsd/importvsdplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/vsd/importvsdplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/vsd/importvsdplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/vsd/importvsdplugin.cpp Sat Oct 31 22:47:39 2020
@@ -34,7 +34,7 @@
void importvsd_freePlugin(ScPlugin* plugin)
{
- ImportVsdPlugin* plug = dynamic_cast<ImportVsdPlugin*>(plugin);
+ ImportVsdPlugin* plug = qobject_cast<ImportVsdPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp Sat Oct 31 22:47:39 2020
@@ -52,7 +52,7 @@
void wmfimplugin_freePlugin(ScPlugin* plugin)
{
- WMFImportPlugin* plug = dynamic_cast<WMFImportPlugin*>(plugin);
+ WMFImportPlugin* plug = qobject_cast<WMFImportPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp Sat Oct 31 22:47:39 2020
@@ -34,7 +34,7 @@
void importwpg_freePlugin(ScPlugin* plugin)
{
- ImportWpgPlugin* plug = dynamic_cast<ImportWpgPlugin*>(plugin);
+ ImportWpgPlugin* plug = qobject_cast<ImportWpgPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp Sat Oct 31 22:47:39 2020
@@ -34,7 +34,7 @@
void importxar_freePlugin(ScPlugin* plugin)
{
- ImportXarPlugin* plug = dynamic_cast<ImportXarPlugin*>(plugin);
+ ImportXarPlugin* plug = qobject_cast<ImportXarPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp Sat Oct 31 22:47:39 2020
@@ -34,7 +34,7 @@
void importxfig_freePlugin(ScPlugin* plugin)
{
- ImportXfigPlugin* plug = dynamic_cast<ImportXfigPlugin*>(plugin);
+ ImportXfigPlugin* plug = qobject_cast<ImportXfigPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/import/xps/importxpsplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/import/xps/importxpsplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xps/importxpsplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xps/importxpsplugin.cpp Sat Oct 31 22:47:39 2020
@@ -40,7 +40,7 @@
void importxps_freePlugin(ScPlugin* plugin)
{
- ImportXpsPlugin* plug = dynamic_cast<ImportXpsPlugin*>(plugin);
+ ImportXpsPlugin* plug = qobject_cast<ImportXpsPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp Sat Oct 31 22:47:39 2020
@@ -44,7 +44,7 @@
//m_actionInfo.keySequence = "CTRL+ALT+F3"
// Should the menu item be enabled when the app starts
// (even without a document open) ?
- m_actionInfo.enabledOnStartup = false;
+ m_actionInfo.enabledOnStartup = false;
m_actionInfo.needsNumObjects = -1;
}
@@ -143,7 +143,7 @@
void picturebrowser_freePlugin(ScPlugin* plugin)
{
- PictureBrowserPlugin* plug = dynamic_cast<PictureBrowserPlugin*> ( plugin );
+ PictureBrowserPlugin* plug = qobject_cast<PictureBrowserPlugin*> ( plugin );
Q_ASSERT ( plug );
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp (original)
+++ trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp Sat Oct 31 22:47:39 2020
@@ -32,7 +32,7 @@
void saveastemplateplugin_freePlugin(ScPlugin* plugin)
{
- SaveAsTemplatePlugin* plug = dynamic_cast<SaveAsTemplatePlugin*>(plugin);
+ SaveAsTemplatePlugin* plug = qobject_cast<SaveAsTemplatePlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp Sat Oct 31 22:47:39 2020
@@ -105,7 +105,7 @@
void scriptplugin_freePlugin(ScPlugin* plugin)
{
- ScriptPlugin* plug = dynamic_cast<ScriptPlugin*>(plugin);
+ ScriptPlugin* plug = qobject_cast<ScriptPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/shapes/shapeplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/shapes/shapeplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/shapes/shapeplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/shapes/shapeplugin.cpp Sat Oct 31 22:47:39 2020
@@ -46,7 +46,7 @@
void shapeplugin_freePlugin(ScPlugin* plugin)
{
- ShapePlugin* plug = dynamic_cast<ShapePlugin*>(plugin);
+ ShapePlugin* plug = qobject_cast<ShapePlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/short-words/shortwords.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/short-words/shortwords.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/short-words/shortwords.cpp (original)
+++ trunk/Scribus/scribus/plugins/short-words/shortwords.cpp Sat Oct 31 22:47:39 2020
@@ -52,7 +52,7 @@
void scribusshortwords_freePlugin(ScPlugin* plugin)
{
- ShortWordsPlugin* plug = dynamic_cast<ShortWordsPlugin*>(plugin);
+ ShortWordsPlugin* plug = qobject_cast<ShortWordsPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/tools/flattenpath/flattenpath.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/tools/flattenpath/flattenpath.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/flattenpath/flattenpath.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/flattenpath/flattenpath.cpp Sat Oct 31 22:47:39 2020
@@ -52,7 +52,7 @@
void flattenpath_freePlugin(ScPlugin* plugin)
{
- FlattenPathPlugin* plug = dynamic_cast<FlattenPathPlugin*>(plugin);
+ FlattenPathPlugin* plug = qobject_cast<FlattenPathPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellplugin.cpp Sat Oct 31 22:47:39 2020
@@ -114,7 +114,7 @@
void hunspellplugin_freePlugin(ScPlugin* plugin)
{
- HunspellPlugin* plug = dynamic_cast<HunspellPlugin*>(plugin);
+ HunspellPlugin* plug = qobject_cast<HunspellPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp Sat Oct 31 22:47:39 2020
@@ -44,7 +44,7 @@
void lenseffects_freePlugin(ScPlugin* plugin)
{
- LensEffectsPlugin* plug = dynamic_cast<LensEffectsPlugin*>(plugin);
+ LensEffectsPlugin* plug = qobject_cast<LensEffectsPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp Sat Oct 31 22:47:39 2020
@@ -45,7 +45,7 @@
void pathconnect_freePlugin(ScPlugin* plugin)
{
- PathConnectPlugin* plug = dynamic_cast<PathConnectPlugin*>(plugin);
+ PathConnectPlugin* plug = qobject_cast<PathConnectPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp Sat Oct 31 22:47:39 2020
@@ -49,7 +49,7 @@
void pathcut_freePlugin(ScPlugin* plugin)
{
- PathCutPlugin* plug = dynamic_cast<PathCutPlugin*>(plugin);
+ PathCutPlugin* plug = qobject_cast<PathCutPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp Sat Oct 31 22:47:39 2020
@@ -56,7 +56,7 @@
void pathfinder_freePlugin(ScPlugin* plugin)
{
- PathFinderPlugin* plug = dynamic_cast<PathFinderPlugin*>(plugin);
+ PathFinderPlugin* plug = qobject_cast<PathFinderPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp Sat Oct 31 22:47:39 2020
@@ -56,7 +56,7 @@
void pathstroker_freePlugin(ScPlugin* plugin)
{
- PathStrokerPlugin* plug = dynamic_cast<PathStrokerPlugin*>(plugin);
+ PathStrokerPlugin* plug = qobject_cast<PathStrokerPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/tools/smoothpath/smoothpath.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/tools/smoothpath/smoothpath.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/smoothpath/smoothpath.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/smoothpath/smoothpath.cpp Sat Oct 31 22:47:39 2020
@@ -53,7 +53,7 @@
void smoothpath_freePlugin(ScPlugin* plugin)
{
- SmoothPathPlugin* plug = dynamic_cast<SmoothPathPlugin*>(plugin);
+ SmoothPathPlugin* plug = qobject_cast<SmoothPathPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/plugins/tools/subdivide/subdivide.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/plugins/tools/subdivide/subdivide.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/subdivide/subdivide.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/subdivide/subdivide.cpp Sat Oct 31 22:47:39 2020
@@ -44,7 +44,7 @@
void subdivide_freePlugin(ScPlugin* plugin)
{
- SubdividePlugin* plug = dynamic_cast<SubdividePlugin*>(plugin);
+ SubdividePlugin* plug = qobject_cast<SubdividePlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/scprintengine_pdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/scprintengine_pdf.cpp
==============================================================================
--- trunk/Scribus/scribus/scprintengine_pdf.cpp (original)
+++ trunk/Scribus/scribus/scprintengine_pdf.cpp Sat Oct 31 22:47:39 2020
@@ -123,7 +123,7 @@
pdfOptions.bleeds = options.bleeds;
// Generate PDF
- QString errorString;
+// QString errorString;
ScCore->fileWatcher->forceScan();
ScCore->fileWatcher->stop();
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sat Oct 31 22:47:39 2020
@@ -1805,7 +1805,7 @@
int windowCount = windows.count();
for ( int i = 0; i < windowCount; ++i )
{
- tw = dynamic_cast<ScribusWin *>(windows.at(i));
+ tw = qobject_cast<ScribusWin *>(windows.at(i));
QMdiSubWindow *tws = windows.at(i);
ScribusWin* scw = dynamic_cast<ScribusWin *>(tws->widget());
if (scw)
@@ -3535,10 +3535,9 @@
}
if (missingMap.count() > 0)
{
- QMultiMap<QString, QString>::const_iterator it;
qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
QString mess = tr("Some color profiles used by this document are not installed:")+"\n\n";
- for (it = missingMap.begin(); it != missingMap.end(); ++it)
+ for (auto it = missingMap.constBegin(); it != missingMap.constEnd(); ++it)
{
mess += it.key() + tr(" was replaced by: ") + it.value() +"\n";
}
@@ -3743,7 +3742,7 @@
{
dirsContext->set("images", fileNames[0].left(fileNames[0].lastIndexOf("/")));
view->requestMode(modeImportImage);
- CanvasMode_ImageImport* cii = dynamic_cast<CanvasMode_ImageImport*>(view->canvasMode());
+ CanvasMode_ImageImport* cii = qobject_cast<CanvasMode_ImageImport*>(view->canvasMode());
if (cii)
cii->setImageList(fileNames);
}
@@ -4358,9 +4357,9 @@
prnEngine = dynamic_cast<ScPrintEngine*>(new ScPrintEngine_GDI(*doc));
#else
if (options.prnLanguage == PrintLanguage::PDF)
- prnEngine = dynamic_cast<ScPrintEngine*>(new ScPrintEngine_PDF(*doc));
+ prnEngine = qobject_cast<ScPrintEngine*>(new ScPrintEngine_PDF(*doc));
else
- prnEngine = dynamic_cast<ScPrintEngine*>(new ScPrintEngine_PS(*doc));
+ prnEngine = qobject_cast<ScPrintEngine*>(new ScPrintEngine_PS(*doc));
#endif
if (prnEngine)
{
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sat Oct 31 22:47:39 2020
@@ -13314,7 +13314,7 @@
QString hString = QString::number(dH * m_docUnitRatio, 'f', unitPrecision) + " " + unitSuffix;
QString vString = QString::number(dV * m_docUnitRatio, 'f', unitPrecision) + " " + unitSuffix;
QString dString = QString::number(dR) + " " + unitGetStrFromIndex(SC_DEGREES);
- tooltip = tr("Number of copies: %1\nHorizontal shift: %2\nVertical shift: %3\nRotation: %4").arg(mdData.copyCount).arg(hString).arg(vString).arg(dString);
+ tooltip = tr("Number of copies: %1\nHorizontal shift: %2\nVertical shift: %3\nRotation: %4").arg(mdData.copyCount).arg(hString, vString, dString);
}
else if (mdData.type == 1) // Create a grid of duplicated items
{
@@ -13349,7 +13349,7 @@
int unitPrecision = unitGetPrecisionFromIndex(this->unitIndex());
QString hString = QString::number(mdData.gridGapH, 'f', unitPrecision) + " " + unitSuffix;
QString vString = QString::number(mdData.gridGapV, 'f', unitPrecision) + " " + unitSuffix;
- tooltip = tr("Number of rows: %1\nNumber of columns: %2\nHorizontal gap: %3\nVertical gap: %4").arg(mdData.gridRows).arg(mdData.gridCols).arg(hString).arg(vString).arg(unitSuffix);
+ tooltip = tr("Number of rows: %1\nNumber of columns: %2\nHorizontal gap: %3\nVertical gap: %4").arg(mdData.gridRows).arg(mdData.gridCols).arg(hString, vString, unitSuffix);
}
else if (mdData.type == 2)
{
Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Sat Oct 31 22:47:39 2020
@@ -3452,7 +3452,7 @@
requestMode(modeImportImage);
if (frame)
{
- auto* cm = dynamic_cast<CanvasMode_ImageImport*>(canvasMode());
+ auto* cm = qobject_cast<CanvasMode_ImageImport*>(canvasMode());
if (!cm)
qFatal("ScribusView::eventFilter cm nullptr");
cm->setImage(frame);
Modified: trunk/Scribus/scribus/text/boxes.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/text/boxes.cpp
==============================================================================
--- trunk/Scribus/scribus/text/boxes.cpp (original)
+++ trunk/Scribus/scribus/text/boxes.cpp Sat Oct 31 22:47:39 2020
@@ -39,11 +39,11 @@
if (containsPoint(coord) && (m_boxes.count() > 0))
{
- LineBox* firstLine = dynamic_cast<LineBox*>(m_boxes.first());
+ LineBox* firstLine = qobject_cast<LineBox*>(m_boxes.first());
if (firstLine && (coord.y() < firstLine->y()))
return firstLine->firstChar();
- LineBox* lastLine = dynamic_cast<LineBox*>(m_boxes.last());
+ LineBox* lastLine = qobject_cast<LineBox*>(m_boxes.last());
if (lastLine && (coord.y() > lastLine->y() + lastLine->naturalHeight()))
return lastLine->lastChar() + 1;
}
@@ -260,7 +260,7 @@
QRectF lastRect;
for (int i = 0; i < boxes().count(); i++)
{
- const GlyphBox* box = dynamic_cast<const GlyphBox*>(boxes()[i]);
+ const GlyphBox* box = qobject_cast<const GlyphBox*>(boxes()[i]);
if (!box)
continue;
const CharStyle& style = box->style();
@@ -483,7 +483,7 @@
{
for (int i = 0; i < boxes().count(); i++)
{
- const GlyphBox* box = dynamic_cast<const GlyphBox*>(boxes()[i]);
+ const GlyphBox* box = qobject_cast<const GlyphBox*>(boxes()[i]);
if (!box)
continue;
Modified: trunk/Scribus/scribus/text/textlayout.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/text/textlayout.cpp
==============================================================================
--- trunk/Scribus/scribus/text/textlayout.cpp (original)
+++ trunk/Scribus/scribus/text/textlayout.cpp Sat Oct 31 22:47:39 2020
@@ -62,7 +62,7 @@
for (const Box *box : m_box->boxes())
{
if (i < count + box->boxes().count())
- return dynamic_cast<const LineBox*>(box->boxes()[i - count]);
+ return qobject_cast<const LineBox*>(box->boxes()[i - count]);
count += box->boxes().count();
}
assert(false);
@@ -87,7 +87,7 @@
assert(ls->lastChar() < story()->length());
assert(!m_box->boxes().empty());
- GroupBox* column = dynamic_cast<GroupBox*>(m_box->boxes().last());
+ GroupBox* column = qobject_cast<GroupBox*>(m_box->boxes().last());
assert(column);
if (ls->type() == Box::T_PathLine)
ls->setAscent(ls->y() - column->naturalHeight());
@@ -103,7 +103,7 @@
if (boxes.isEmpty())
return;
- GroupBox* column = dynamic_cast<GroupBox*>(boxes.last());
+ GroupBox* column = qobject_cast<GroupBox*>(boxes.last());
assert(column);
int lineCount = column->boxes().count();
@@ -310,7 +310,7 @@
return 0;
const QList<Box*>& boxes = m_box->boxes();
- const GroupBox* column = dynamic_cast<const GroupBox*>(boxes.first());
+ const GroupBox* column = qobject_cast<const GroupBox*>(boxes.first());
assert(column);
// Beware of columns hidden by other objects
@@ -320,7 +320,7 @@
int columnCount = boxes.count();
for (int i = 1; i < columnCount; ++i)
{
- column = dynamic_cast<const GroupBox*>(boxes.at(i));
+ column = qobject_cast<const GroupBox*>(boxes.at(i));
assert(column);
if (!column->isEmpty())
@@ -341,7 +341,7 @@
int columnIndex = boxes.count() - 1;
do
{
- column = dynamic_cast<const GroupBox*>(boxes.at(columnIndex));
+ column = qobject_cast<const GroupBox*>(boxes.at(columnIndex));
assert(column);
if (!column->isEmpty())
Modified: trunk/Scribus/scribus/ui/about.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/about.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/about.cpp (original)
+++ trunk/Scribus/scribus/ui/about.cpp Sat Oct 31 22:47:39 2020
@@ -114,8 +114,8 @@
buildID = new QLabel( tab );
buildID->setAlignment(Qt::AlignCenter);
buildID->setTextInteractionFlags(Qt::TextSelectableByMouse);
- QString BUILD_DAY = "31";
- QString BUILD_MONTH = CommonStrings::march;
+ QString BUILD_DAY = "10";
+ QString BUILD_MONTH = CommonStrings::october;
QString BUILD_YEAR = "2020";
QString BUILD_TIME = "";
QString BUILD_TZ = "";
Modified: trunk/Scribus/scribus/ui/colorcombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/colorcombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/colorcombo.cpp (original)
+++ trunk/Scribus/scribus/ui/colorcombo.cpp Sat Oct 31 22:47:39 2020
@@ -58,11 +58,11 @@
void ColorCombo::setColors(ColorList& list, bool insertNone)
{
- ColorListBox* clb = dynamic_cast<ColorListBox*>(view());
+ ColorListBox* clb = qobject_cast<ColorListBox*>(view());
if (!clb)
return;
- ColorListModel* clm = dynamic_cast<ColorListModel*>(clb->model());
+ ColorListModel* clm = qobject_cast<ColorListModel*>(clb->model());
if (!clm)
return;
@@ -81,7 +81,7 @@
void ColorCombo::setPixmapType(ColorCombo::PixmapType type)
{
- ColorListBox* clb = dynamic_cast<ColorListBox*>(view());
+ ColorListBox* clb = qobject_cast<ColorListBox*>(view());
if (!clb)
return;
Modified: trunk/Scribus/scribus/ui/colorlistbox.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/colorlistbox.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/colorlistbox.cpp (original)
+++ trunk/Scribus/scribus/ui/colorlistbox.cpp Sat Oct 31 22:47:39 2020
@@ -340,7 +340,7 @@
void ColorListBox::insertItem(int row, const ScColor& color, const QString& colorName)
{
- ColorListModel* colorListModel = dynamic_cast<ColorListModel*>(model());
+ ColorListModel* colorListModel = qobject_cast<ColorListModel*>(model());
if (!colorListModel)
return;
@@ -354,7 +354,7 @@
bool ColorListBox::isNoneColorShown() const
{
- ColorListModel* colorListModel = dynamic_cast<ColorListModel*>(model());
+ ColorListModel* colorListModel = qobject_cast<ColorListModel*>(model());
if (colorListModel)
return colorListModel->isNoneColorShown();
return false;
@@ -398,7 +398,7 @@
{
ColorList::Iterator it;
- ColorListModel* colorModel = dynamic_cast<ColorListModel*>(this->model());
+ ColorListModel* colorModel = qobject_cast<ColorListModel*>(this->model());
if (!colorModel)
return;
@@ -452,7 +452,7 @@
void ColorListBox::setShowNoneColor(bool showNone)
{
- ColorListModel* colorListModel = dynamic_cast<ColorListModel*>(model());
+ ColorListModel* colorListModel = qobject_cast<ColorListModel*>(model());
if (colorListModel)
colorListModel->setShowNoneColor(showNone);
}
@@ -471,7 +471,7 @@
sortRule = pmen->actions().indexOf(pmen->exec(QCursor::pos()));
delete pmen;
- ColorListModel* colorListModel = dynamic_cast<ColorListModel*>(model());
+ ColorListModel* colorListModel = qobject_cast<ColorListModel*>(model());
if (!colorListModel)
return;
@@ -499,7 +499,7 @@
clear();
reset();
- ColorListModel* colorModel = dynamic_cast<ColorListModel*>(this->model());
+ ColorListModel* colorModel = qobject_cast<ColorListModel*>(this->model());
if (colorModel)
showNoneColor = colorModel->isNoneColorShown();
setColors(list, showNoneColor);
Modified: trunk/Scribus/scribus/ui/contextmenu.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/contextmenu.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/contextmenu.cpp (original)
+++ trunk/Scribus/scribus/ui/contextmenu.cpp Sat Oct 31 22:47:39 2020
@@ -582,7 +582,7 @@
if (!layerLocked)
{
QAction *act = addAction( tr("Paste File..."));
- connect(act, SIGNAL(triggered()), dynamic_cast<QObject*>(m_doc->view()->m_canvasMode), SLOT(importToPage()));
+ connect(act, SIGNAL(triggered()), qobject_cast<QObject*>(m_doc->view()->m_canvasMode), SLOT(importToPage()));
addSeparator();
}
Modified: trunk/Scribus/scribus/ui/fontcombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/fontcombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/fontcombo.cpp (original)
+++ trunk/Scribus/scribus/ui/fontcombo.cpp Sat Oct 31 22:47:39 2020
@@ -173,7 +173,7 @@
for (QStringList::ConstIterator it = styleList.constBegin(); it != styleList.constEnd(); ++it)
{
SCFonts::ConstIterator fIt = prefsManager.appPrefs.fontPrefs.AvailFonts.find(fntFamily + " " + *it);
- if (fIt != prefsManager.appPrefs.fontPrefs.AvailFonts.end())
+ if (fIt != prefsManager.appPrefs.fontPrefs.AvailFonts.constEnd())
{
if (!fIt->usable() || fIt->isReplacement())
continue;
@@ -223,7 +223,7 @@
for (QStringList::ConstIterator it3 = slist.constBegin(); it3 != slist.constEnd(); ++it3)
{
SCFonts::ConstIterator fIt = prefsManager.appPrefs.fontPrefs.AvailFonts.find(family + " " + *it3);
- if (fIt != prefsManager.appPrefs.fontPrefs.AvailFonts.end())
+ if (fIt != prefsManager.appPrefs.fontPrefs.AvailFonts.constEnd())
{
if (!fIt->usable() || fIt->isReplacement())
continue;
@@ -281,7 +281,7 @@
else
{
QMap<QString, QStringList>::ConstIterator fmIt = prefsManager.appPrefs.fontPrefs.AvailFonts.fontMap.find(*it2);
- if (fmIt == prefsManager.appPrefs.fontPrefs.AvailFonts.fontMap.end())
+ if (fmIt == prefsManager.appPrefs.fontPrefs.AvailFonts.fontMap.constEnd())
continue;
if (fmIt->count() <= 0)
continue;
@@ -320,7 +320,7 @@
for (QStringList::ConstIterator it = slist.constBegin(); it != slist.constEnd(); ++it)
{
SCFonts::ConstIterator fIt = prefsManager.appPrefs.fontPrefs.AvailFonts.find(family + " " + *it);
- if (fIt != prefsManager.appPrefs.fontPrefs.AvailFonts.end())
+ if (fIt != prefsManager.appPrefs.fontPrefs.AvailFonts.constEnd())
{
if (!fIt->usable() || fIt->isReplacement())
continue;
@@ -668,7 +668,7 @@
QValidator::State FontComboValidator::validate(QString & input, int & pos) const
{
- QComboBox* comboBox = dynamic_cast<QComboBox*>(this->parent());
+ QComboBox* comboBox = qobject_cast<QComboBox*>(this->parent());
if (!comboBox)
return QValidator::Invalid;
Modified: trunk/Scribus/scribus/ui/latexeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/latexeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/latexeditor.cpp (original)
+++ trunk/Scribus/scribus/ui/latexeditor.cpp Sat Oct 31 22:47:39 2020
@@ -637,7 +637,7 @@
void LatexEditor::insertButtonClicked(QObject *widget)
{
- QListWidget *list = dynamic_cast<QListWidget*>(widget);
+ QListWidget *list = qobject_cast<QListWidget*>(widget);
Q_ASSERT(list);
sourceTextEdit->insertPlainText(
list->currentItem()->data(Qt::UserRole).toString());
Modified: trunk/Scribus/scribus/ui/outputpreview_pdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/outputpreview_pdf.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outputpreview_pdf.cpp (original)
+++ trunk/Scribus/scribus/ui/outputpreview_pdf.cpp Sat Oct 31 22:47:39 2020
@@ -556,7 +556,7 @@
m_pdfOptions.bleeds.set(0, 0, 0, 0);
// Generate PDF
- QString errorString;
+// QString errorString;
QString pdfFileName = ScPaths::tempFileDir() + "/" + m_tempBaseName + ".pdf";
ScCore->fileWatcher->forceScan();
@@ -1147,4 +1147,4 @@
pixmap = QPixmap(1, 1);
qApp->restoreOverrideCursor();
updateOptionsFromUI();
-}
+}
Modified: trunk/Scribus/scribus/ui/picsearchoptions.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/picsearchoptions.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/picsearchoptions.cpp (original)
+++ trunk/Scribus/scribus/ui/picsearchoptions.cpp Sat Oct 31 22:47:39 2020
@@ -134,7 +134,7 @@
void PicSearchOptions::slotSearchPicAborted(bool userCancelled)
{
m_bCancelled = userCancelled;
- const FileSearch* search = dynamic_cast<const FileSearch*>(sender());
+ const FileSearch* search = qobject_cast<const FileSearch*>(sender());
assert(search);
setSearchButton(false, search);
enableGuiWhileSearching(true);
Modified: trunk/Scribus/scribus/ui/preferencesdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/preferencesdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/preferencesdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/preferencesdialog.cpp Sat Oct 31 22:47:39 2020
@@ -155,7 +155,7 @@
void PreferencesDialog::initPreferenceValues()
{
- mainWin = dynamic_cast<ScribusMainWindow*>(parent());
+ mainWin = qobject_cast<ScribusMainWindow*>(parent());
docUnitIndex = localPrefs.docSetupPrefs.docUnitIndex;
unitRatio = unitGetRatioFromIndex(docUnitIndex);
}
@@ -238,7 +238,7 @@
// #15583: emitting manually accepted should not be needed
// QDialog::accept() will emit it by itself
// emit accepted();
- return QDialog::accept();
+ QDialog::accept();
}
void PreferencesDialog::setupListWidget()
Modified: trunk/Scribus/scribus/ui/preferencesdialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/preferencesdialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/preferencesdialog.h (original)
+++ trunk/Scribus/scribus/ui/preferencesdialog.h Sat Oct 31 22:47:39 2020
@@ -63,7 +63,7 @@
public slots:
/// \brief Overridden to emit accepted(), which plugin panels use
- virtual void accept();
+ void accept() override;
void itemSelected(QListWidgetItem* ic);
void newItemSelected();
void restoreDefaults();
@@ -75,7 +75,6 @@
protected slots:
virtual void languageChange();
void applyButtonClicked();
-
protected:
void addWidget(Prefs_Pane* tab);
Modified: trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp Sat Oct 31 22:47:39 2020
@@ -52,7 +52,7 @@
Q_ASSERT(plugin); // all the returned names should represent loaded plugins
if (plugin->inherits("ScActionPlugin"))
{
- ixplug = dynamic_cast<ScActionPlugin*>(plugin);
+ ixplug = qobject_cast<ScActionPlugin*>(plugin);
Q_ASSERT(ixplug);
ScActionPlugin::ActionInfo ai(ixplug->actionInfo());
itnmenua->second << ai.name;
Modified: trunk/Scribus/scribus/ui/prefs_plugins.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/prefs_plugins.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_plugins.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_plugins.cpp Sat Oct 31 22:47:39 2020
@@ -53,7 +53,7 @@
// Resident plugins don't have predefined actions
if (plugin->inherits("ScActionPlugin"))
{
- ixplug = dynamic_cast<ScActionPlugin*>(plugin);
+ ixplug = qobject_cast<ScActionPlugin*>(plugin);
Q_ASSERT(ixplug);
ScActionPlugin::ActionInfo ai(ixplug->actionInfo());
// menu path
Modified: trunk/Scribus/scribus/ui/proptree.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/proptree.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/proptree.cpp (original)
+++ trunk/Scribus/scribus/ui/proptree.cpp Sat Oct 31 22:47:39 2020
@@ -355,7 +355,7 @@
setData(1, Qt::UserRole, value);
// setData(1, Qt::DisplayRole, QString("%1 %2").arg(value, 0, 'f', m_decimals).arg(unitGetSuffixFromIndex(m_unit)));
- setData(1, Qt::DisplayRole, QString("%1 %2").arg(l.toString(value, 'f', m_decimals)).arg(unitGetSuffixFromIndex(m_unit)));
+ setData(1, Qt::DisplayRole, QString("%1 %2").arg(l.toString(value, 'f', m_decimals), unitGetSuffixFromIndex(m_unit)));
}
@@ -392,7 +392,7 @@
if (m_type == DoubleSpinBox)
{
const QLocale& l(LocaleManager::instance().userPreferredLocale());
- setData(1, Qt::DisplayRole, QString("%1 %2").arg(l.toString(data(1, Qt::UserRole).toDouble(), 'f', unit)).arg(unitGetSuffixFromIndex(m_unit)));
+ setData(1, Qt::DisplayRole, QString("%1 %2").arg(l.toString(data(1, Qt::UserRole).toDouble(), 'f', unit), unitGetSuffixFromIndex(m_unit)));
}
else
setData(1, Qt::DisplayRole, QString("%1 %2").arg(data(1, Qt::UserRole).toString(), unitGetSuffixFromIndex(m_unit)));
Modified: trunk/Scribus/scribus/ui/scdockpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/scdockpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scdockpalette.cpp (original)
+++ trunk/Scribus/scribus/ui/scdockpalette.cpp Sat Oct 31 22:47:39 2020
@@ -253,7 +253,7 @@
{
m_palettePrefs->set("floating", isFloating());
Qt::DockWidgetArea area = Qt::NoDockWidgetArea;
- QMainWindow* mainWindow = dynamic_cast<QMainWindow*>(parent());
+ QMainWindow* mainWindow = qobject_cast<QMainWindow*>(parent());
if (mainWindow)
area = mainWindow->dockWidgetArea(this);
m_palettePrefs->set("area", (int) area);
Modified: trunk/Scribus/scribus/ui/scmenu.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/scmenu.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scmenu.cpp (original)
+++ trunk/Scribus/scribus/ui/scmenu.cpp Sat Oct 31 22:47:39 2020
@@ -150,14 +150,14 @@
QString menuItemListClassName = menuItemList[i]->metaObject()->className();
if (menuItemListClassName == "ScrAction")
{
- ScrAction * act = dynamic_cast<ScrAction *>(menuItem);
+ ScrAction * act = qobject_cast<ScrAction *>(menuItem);
if (act!=nullptr)
menuListHasNoIcons = act->icon().isNull();
break;
}
if (menuItemListClassName == "ScrPopupMenu")
{
- ScrPopupMenu * men = dynamic_cast<ScrPopupMenu *>(menuItem);
+ ScrPopupMenu * men = qobject_cast<ScrPopupMenu *>(menuItem);
if (men!=nullptr)
menuListHasNoIcons = men->getMenuIcon().isNull();
break;
@@ -286,7 +286,7 @@
QString menuItemListClassName=listObj->metaObject()->className();
if (menuItemListClassName=="ScrAction")
{
- ScrAction * act = dynamic_cast<ScrAction *>(listObj);
+ ScrAction * act = qobject_cast<ScrAction *>(listObj);
if (act!=nullptr)
localPopupMenu->addAction(act);
}
@@ -294,7 +294,7 @@
{
if (menuItemListClassName=="ScrPopupMenu")
{
- ScrPopupMenu * men = dynamic_cast<ScrPopupMenu *>(listObj);
+ ScrPopupMenu * men = qobject_cast<ScrPopupMenu *>(listObj);
if (men!=nullptr)
{
//qDebug()<<men->localPopupMenu->title()<<men->localPopupMenu->;
@@ -329,14 +329,14 @@
QString menuItemListClassName=listObj->metaObject()->className();
if (menuItemListClassName=="ScrAction")
{
- auto *sca=dynamic_cast<ScrAction *>(listObj);
+ auto *sca=qobject_cast<ScrAction *>(listObj);
if (sca!=nullptr)
actNames->append(sca->objectName());
}
else
if (menuItemListClassName=="ScrPopupMenu")
{
- auto *scp=dynamic_cast<ScrPopupMenu *>(listObj);
+ auto *scp=qobject_cast<ScrPopupMenu *>(listObj);
if (scp!=nullptr)
scp->generateEntryList(actNames);
}
Modified: trunk/Scribus/scribus/ui/scrspinbox.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/scrspinbox.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scrspinbox.cpp (original)
+++ trunk/Scribus/scribus/ui/scrspinbox.cpp Sat Oct 31 22:47:39 2020
@@ -158,9 +158,9 @@
// const lconv * lc(localeconv());
QString cSepDecimal(QLocale::c().decimalPoint());
QString cSepGroup(QLocale::c().groupSeparator());
- QString sysSepDecimal(QLocale::system().decimalPoint());
+// QString sysSepDecimal(QLocale::system().decimalPoint());
// qDebug()<<"sysSepDecimal"<<sysSepDecimal;
- QString sysSepGroup(QLocale::system().groupSeparator());
+// QString sysSepGroup(QLocale::system().groupSeparator());
// qDebug()<<"sysSepGroup"<<sysSepGroup;
// QString crtSepDecimal(QString::fromLocal8Bit( lc->decimal_point ));
// QString crtSepGroup(QString::fromLocal8Bit( lc->thousands_sep ));
Modified: trunk/Scribus/scribus/ui/search.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/search.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/search.cpp (original)
+++ trunk/Scribus/scribus/ui/search.cpp Sat Oct 31 22:47:39 2020
@@ -103,7 +103,7 @@
SStyleVal->setEditable(false);
for (int x = 0; x < doc->paragraphStyles().count(); ++x)
SStyleVal->addItem(doc->paragraphStyles()[x].name());
- QListView *tmpView = dynamic_cast<QListView*>(SStyleVal->view()); Q_ASSERT(tmpView);
+ QListView *tmpView = qobject_cast<QListView*>(SStyleVal->view()); Q_ASSERT(tmpView);
int tmpWidth = tmpView->sizeHintForColumn(0);
if (tmpWidth > 0)
tmpView->setMinimumWidth(tmpWidth + 24);
@@ -116,7 +116,7 @@
size_t ar_sty = sizeof(tmp_sty) / sizeof(*tmp_sty);
for (uint a = 0; a < ar_sty; ++a)
SAlignVal->addItem( tmp_sty[a] );
- tmpView = dynamic_cast<QListView*>(SAlignVal->view()); Q_ASSERT(tmpView);
+ tmpView = qobject_cast<QListView*>(SAlignVal->view()); Q_ASSERT(tmpView);
tmpWidth = tmpView->sizeHintForColumn(0);
if (tmpWidth > 0)
tmpView->setMinimumWidth(tmpWidth + 24);
@@ -202,7 +202,7 @@
RStyleVal->setEditable(false);
for (int x = 0; x < doc->paragraphStyles().count(); ++x)
RStyleVal->addItem(doc->paragraphStyles()[x].name());
- tmpView = dynamic_cast<QListView*>(RStyleVal->view()); Q_ASSERT(tmpView);
+ tmpView = qobject_cast<QListView*>(RStyleVal->view()); Q_ASSERT(tmpView);
tmpWidth = tmpView->sizeHintForColumn(0);
if (tmpWidth > 0)
tmpView->setMinimumWidth(tmpWidth + 24);
@@ -213,7 +213,7 @@
RAlignVal->setEditable(false);
for (uint a = 0; a < ar_sty; ++a)
RAlignVal->addItem(tmp_sty[a]);
- tmpView = dynamic_cast<QListView*>(RAlignVal->view()); Q_ASSERT(tmpView);
+ tmpView = qobject_cast<QListView*>(RAlignVal->view()); Q_ASSERT(tmpView);
tmpWidth = tmpView->sizeHintForColumn(0);
if (tmpWidth > 0)
tmpView->setMinimumWidth(tmpWidth + 24);
Modified: trunk/Scribus/scribus/ui/smcstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/smcstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcstylewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/smcstylewidget.cpp Sat Oct 31 22:47:39 2020
@@ -150,7 +150,7 @@
language_->clear();
language_->addItems(langList);
- QListView *tmpView = dynamic_cast<QListView*>(language_->view());
+ QListView *tmpView = qobject_cast<QListView*>(language_->view());
Q_ASSERT(tmpView);
int tmpWidth = tmpView->sizeHintForColumn(0);
if (tmpWidth > 0)
Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp (original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp Sat Oct 31 22:47:39 2020
@@ -2234,18 +2234,18 @@
m_blockUpdate = false;
}
-void StoryEditor::keyPressEvent (QKeyEvent * e)
+void StoryEditor::keyPressEvent(QKeyEvent *e)
{
if (e->key() == Qt::Key_Escape)
close();
else
{
activFromApp = false;
- return QMainWindow::keyReleaseEvent(e);
- }
-}
-
-bool StoryEditor::eventFilter( QObject* ob, QEvent* ev )
+ QMainWindow::keyReleaseEvent(e);
+ }
+}
+
+bool StoryEditor::eventFilter(QObject* ob, QEvent *ev)
{
if (!m_spellActive)
{
@@ -2778,7 +2778,7 @@
if (PluginManager::instance().DLLexists("fontpreview"))
{
- plugin = dynamic_cast<ScActionPlugin*>(PluginManager::instance().getPlugin("fontpreview", false));
+ plugin = qobject_cast<ScActionPlugin*>(PluginManager::instance().getPlugin("fontpreview", false));
if (plugin)
result = plugin->run(this, m_doc, Editor->CurrFont);
if (result)
Modified: trunk/Scribus/scribus/ui/storyeditor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/storyeditor.h
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.h (original)
+++ trunk/Scribus/scribus/ui/storyeditor.h Sat Oct 31 22:47:39 2020
@@ -545,8 +545,8 @@
void hideEvent(QHideEvent *) override;
void closeEvent(QCloseEvent *) override;
- void keyPressEvent (QKeyEvent * e) override;
- bool eventFilter( QObject* ob, QEvent* ev ) override;
+ void keyPressEvent(QKeyEvent *e) override;
+ bool eventFilter(QObject *ob, QEvent* ev) override;
QHBoxLayout* StoryEd2Layout { nullptr };
QGridLayout* ButtonGroup1Layout { nullptr };
Modified: trunk/Scribus/scribus/ui/stylecombos.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/stylecombos.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/stylecombos.cpp (original)
+++ trunk/Scribus/scribus/ui/stylecombos.cpp Sat Oct 31 22:47:39 2020
@@ -137,7 +137,7 @@
setCurrentIndex(newIndex);
}
}
- QListView *tmpView = dynamic_cast<QListView*>(view());
+ QListView *tmpView = qobject_cast<QListView*>(view());
if (tmpView)
{
int tmpWidth = tmpView->sizeHintForColumn(0);
@@ -268,7 +268,7 @@
setCurrentIndex(newIndex);
}
}
- QListView *tmpView = dynamic_cast<QListView*>(view());
+ QListView *tmpView = qobject_cast<QListView*>(view());
if (tmpView)
{
int tmpWidth = tmpView->sizeHintForColumn(0);
@@ -400,7 +400,7 @@
}
}
- QListView *tmpView = dynamic_cast<QListView*>(view());
+ QListView *tmpView = qobject_cast<QListView*>(view());
if (tmpView)
{
int tmpWidth = tmpView->sizeHintForColumn(0);
@@ -531,7 +531,7 @@
setCurrentIndex(newIndex);
}
}
- QListView *tmpView = dynamic_cast<QListView*>(view());
+ QListView *tmpView = qobject_cast<QListView*>(view());
if (tmpView)
{
int tmpWidth = tmpView->sizeHintForColumn(0);
Modified: trunk/Scribus/scribus/ui/stylemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/stylemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/stylemanager.cpp (original)
+++ trunk/Scribus/scribus/ui/stylemanager.cpp Sat Oct 31 22:47:39 2020
@@ -194,7 +194,7 @@
for (int i = 0; i < m_items.count(); ++i)
{
StyleItem* item = m_items[i];
- ItemType* typedItem = dynamic_cast<ItemType*>(item);
+ ItemType* typedItem = qobject_cast<ItemType*>(item);
if (typedItem)
return typedItem;
}
@@ -359,19 +359,19 @@
SMLineStyle *lstyle = nullptr;
for (int i = 0; i < m_items.count(); ++i)
{
- pstyle = dynamic_cast<SMParagraphStyle*>(m_items.at(i));
+ pstyle = qobject_cast<SMParagraphStyle*>(m_items.at(i));
if (pstyle)
break;
}
for (int i = 0; i < m_items.count(); ++i)
{
- cstyle = dynamic_cast<SMCharacterStyle*>(m_items.at(i));
+ cstyle = qobject_cast<SMCharacterStyle*>(m_items.at(i));
if (cstyle)
break;
}
for (int i = 0; i < m_items.count(); ++i)
{
- lstyle = dynamic_cast<SMLineStyle*>(m_items.at(i));
+ lstyle = qobject_cast<SMLineStyle*>(m_items.at(i));
if (lstyle)
break;
}
Modified: trunk/Scribus/scribus/ui/symbolpalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24137&path=/trunk/Scribus/scribus/ui/symbolpalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/symbolpalette.h (original)
+++ trunk/Scribus/scribus/ui/symbolpalette.h Sat Oct 31 22:47:39 2020
@@ -91,7 +91,7 @@
void handleDeleteItem();
void handleUpdateRequest(int);
void languageChange();
- void keyPressEvent(QKeyEvent *e);
+ void keyPressEvent(QKeyEvent *e) override;
signals:
void startEdit(QString);
More information about the scribus-commit
mailing list