r24522 by jghali - Code style fixes

scribus-commit scribus-commit at lists.scribus.net
Mon Feb 22 22:05:33 UTC 2021


Author: jghali
Date: Mon Feb 22 22:05:33 2021
New Revision: 24522

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24522
Log:
Code style fixes

Modified:
    trunk/Scribus/scribus/ui/fontcombo.cpp

Modified: trunk/Scribus/scribus/ui/fontcombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24522&path=/trunk/Scribus/scribus/ui/fontcombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/fontcombo.cpp	(original)
+++ trunk/Scribus/scribus/ui/fontcombo.cpp	Mon Feb 22 22:05:33 2021
@@ -119,24 +119,24 @@
 	fontComboLayout = new QGridLayout(this);
 	fontComboLayout->setMargin(0);
 	fontComboLayout->setSpacing(0);
-	int col=0;
+	int col = 0;
 	if (showLabels)
 	{
-		fontFaceLabel=new QLabel("", this);
-		fontStyleLabel=new QLabel("", this);
-		fontComboLayout->addWidget(fontFaceLabel,0,0);
-		fontComboLayout->addWidget(fontStyleLabel,1,0);
-		fontComboLayout->setColumnStretch(1,10);
-		col=1;
+		fontFaceLabel = new QLabel("", this);
+		fontStyleLabel = new QLabel("", this);
+		fontComboLayout->addWidget(fontFaceLabel, 0, 0);
+		fontComboLayout->addWidget(fontStyleLabel, 1, 0);
+		fontComboLayout->setColumnStretch(1, 10);
+		col = 1;
 	}
 	fontFamily = new QComboBox(this);
 	fontFamily->setEditable(true);
 	fontFamily->setValidator(new FontComboValidator(fontFamily));
 	fontFamily->setInsertPolicy(QComboBox::NoInsert);
 	fontFamily->setItemDelegate(new FontFamilyDelegate(this));
-	fontComboLayout->addWidget(fontFamily,0,col);
+	fontComboLayout->addWidget(fontFamily, 0, col);
 	fontStyle = new QComboBox(this);
-	fontComboLayout->addWidget(fontStyle,1,col);
+	fontComboLayout->addWidget(fontStyle, 1, col);
 	isForAnnotation = true;  // this is merely to ensure that the list is rebuilt
 	rebuildList(nullptr);
 	connect(fontFamily, SIGNAL(activated(int)), this, SLOT(familySelected(int)));
@@ -184,12 +184,10 @@
 	fontStyle->addItems(slist);
 	if (slist.contains(curr))
 		setCurrentComboItem(fontStyle, curr);
-	else
-		if (slist.contains("Regular"))
-			setCurrentComboItem(fontStyle, "Regular");
-		else
-			if (slist.contains("Roman"))
-				setCurrentComboItem(fontStyle, "Roman");
+	else if (slist.contains("Regular"))
+		setCurrentComboItem(fontStyle, "Regular");
+	else if (slist.contains("Roman"))
+		setCurrentComboItem(fontStyle, "Roman");
 	emit fontSelected(fontFamily->itemText(id) + " " + fontStyle->currentText());
 	connect(fontStyle, SIGNAL(activated(int)), this, SLOT(styleSelected(int)));
 }




More information about the scribus-commit mailing list