[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kraft/kf5] src: Simplify if statement
From: Klaas Freitag <freitag () kde ! org>
Date: 2015-09-15 20:28:31
Message-ID: E1Zbwq7-00066S-JW () scm ! kde ! org
[Download RAW message or body]
Git commit 71149c37b970d02fa3f4c8c26b10b2e44de31b9f by Klaas Freitag.
Committed on 18/08/2015 at 19:57.
Pushed by freitag into branch 'kf5'.
Simplify if statement
M +4 -4 src/docposition.cpp
http://commits.kde.org/kraft/71149c37b970d02fa3f4c8c26b10b2e44de31b9f
diff --git a/src/docposition.cpp b/src/docposition.cpp
index b0e8949..8f96198 100644
--- a/src/docposition.cpp
+++ b/src/docposition.cpp
@@ -19,6 +19,7 @@
#include <QString>
#include <qdom.h>
#include <QDebug>
+#include <QLocale>
// application specific includes
#include "einheit.h"
@@ -84,10 +85,9 @@ DocPositionBase& DocPositionBase::operator=( const DocPositionBase& dp )
void DocPositionBase::setAttribute( const Attribute& attrib )
{
- if ( attrib.name().isEmpty() )
- // qDebug () << "WRN: Can not save attribute with empty name!" << endl;
- else
- mAttribs[ attrib.name() ] = attrib;
+ if( ! attrib.name().isEmpty() ) {
+ mAttribs[ attrib.name() ] = attrib;
+ }
}
AttributeMap DocPositionBase::attributes()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic