r24456 by jghali - Code style fixes
scribus-commit
scribus-commit at lists.scribus.net
Sun Feb 7 23:42:45 UTC 2021
Author: jghali
Date: Sun Feb 7 23:42:44 2021
New Revision: 24456
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24456
Log:
Code style fixes
Modified:
trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
trunk/Scribus/scribus/plugins/import/cgm/importcgm.h
Modified: trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24456&path=/trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp Sun Feb 7 23:42:44 2021
@@ -98,8 +98,8 @@
CgmPlug::CgmPlug(ScribusDoc* doc, int flags)
{
- tmpSel=new Selection(this, false);
- m_Doc=doc;
+ tmpSel = new Selection(this, false);
+ m_Doc = doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
progressDialog = nullptr;
@@ -139,7 +139,7 @@
QImage tmpImage;
if (Elements.count() > 0)
{
- for (int dre=0; dre<Elements.count(); ++dre)
+ for (int dre =0; dre < Elements.count(); ++dre)
{
tmpSel->addItem(Elements.at(dre), true);
}
@@ -173,15 +173,15 @@
bool ret = false;
CustColors.clear();
QFileInfo fi = QFileInfo(fNameIn);
- if ( !ScCore->usingGUI() )
+ if (!ScCore->usingGUI())
{
interactive = false;
showProgress = false;
}
baseFile = QDir::cleanPath(QDir::toNativeSeparators(fi.absolutePath()+"/"));
- if ( showProgress )
- {
- ScribusMainWindow* mw=(m_Doc==nullptr) ? ScCore->primaryMainWindow() : m_Doc->scMW();
+ if (showProgress)
+ {
+ ScribusMainWindow* mw = (m_Doc==nullptr) ? ScCore->primaryMainWindow() : m_Doc->scMW();
progressDialog = new MultiProgressDialog( tr("Importing: %1").arg(fi.fileName()), CommonStrings::tr_Cancel, mw );
QStringList barNames, barTexts;
barNames << "GI";
@@ -224,7 +224,7 @@
{
if (!m_Doc || (flags & LoadSavePlugin::lfCreateDoc))
{
- m_Doc=ScCore->primaryMainWindow()->doFileNew(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false, 0, false, 0, 1, "Custom", true);
+ m_Doc = ScCore->primaryMainWindow()->doFileNew(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false, 0, false, 0, 1, "Custom", true);
ScCore->primaryMainWindow()->HaveNewDoc();
ret = true;
baseX = 0;
@@ -282,7 +282,7 @@
if (!(flags & LoadSavePlugin::lfLoadAsPattern))
{
m_Doc->m_Selection->delaySignalsOn();
- for (int dre=0; dre<Elements.count(); ++dre)
+ for (int dre = 0; dre < Elements.count(); ++dre)
{
m_Doc->m_Selection->addItem(Elements.at(dre), true);
}
@@ -298,7 +298,7 @@
m_Doc->DraggedElem = nullptr;
m_Doc->DragElements.clear();
m_Doc->m_Selection->delaySignalsOn();
- for (int dre=0; dre<Elements.count(); ++dre)
+ for (int dre = 0; dre < Elements.count(); ++dre)
{
tmpSel->addItem(Elements.at(dre), true);
}
@@ -488,7 +488,7 @@
{
tmpSel->clear();
tmpSel->delaySignalsOn();
- for (int dre=0; dre<Elements.count(); ++dre)
+ for (int dre = 0; dre < Elements.count(); ++dre)
{
tmpSel->addItem(Elements.at(dre), true);
}
Modified: trunk/Scribus/scribus/plugins/import/cgm/importcgm.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24456&path=/trunk/Scribus/scribus/plugins/import/cgm/importcgm.h
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cgm/importcgm.h (original)
+++ trunk/Scribus/scribus/plugins/import/cgm/importcgm.h Sun Feb 7 23:42:44 2021
@@ -36,11 +36,13 @@
public:
ScBitReader(QByteArray &data);
~ScBitReader();
+
quint32 getUInt(uint size);
void alignToWord();
+
private:
- int actByte;
- int actBit;
+ int actByte { 0 };
+ int actBit { 7 };
QByteArray buffer;
};
More information about the scribus-commit
mailing list