Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit da841140 authored by Stephane Mankowski's avatar Stephane Mankowski

Code quality

parent 1b13c99b
......@@ -154,7 +154,7 @@ void SKGDebugPluginWidget::onExecuteSqlOrder(bool iInTransaction)
auto t = myEngine.globalObject();
t.setProperty(QStringLiteral("skgresult"), myEngine.newQObject(ui.kSQLResult));
t.setProperty(QStringLiteral("skgdocument"), myEngine.newQObject(getDocument()));
//t.setProperty(QStringLiteral("skgerror"), myEngine.newQObject(&err));
// t.setProperty(QStringLiteral("skgerror"), myEngine.newQObject(&err));
t.setProperty(QStringLiteral("skgmainpanel"), myEngine.newQObject(SKGMainPanel::getMainPanel()));
// Finally execute the scripting code.
......
......@@ -66,6 +66,10 @@ SKGPropertiesPlugin::~SKGPropertiesPlugin()
if (m_billsProcess.state() == QProcess::Running) {
m_billsProcess.kill();
}
if (m_billsProcess.state() == QProcess::Running) {
m_billsProcess.kill();
m_billsProcess.waitForFinished(-1);
}
}
void SKGPropertiesPlugin::onBillsRetreived()
......
......@@ -167,7 +167,7 @@
<item>
<widget class="QLabel" name="apikeys_label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Some download sources (e.g. coinmarketcap, cryptocompare) may require an API key. So you need to request one from the source site and enter it here:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The following download sources need an API key. So you need to request one from the source site web and enter it here:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
......
......@@ -71,6 +71,12 @@ SKGAccountObject& SKGAccountObject::operator= (const SKGObjectBase& iObject)
return *this;
}
SKGAccountObject& SKGAccountObject::operator= (const SKGAccountObject& iObject)
{
copyFrom(iObject);
return *this;
}
SKGError SKGAccountObject::setInitialBalance(double iBalance, const SKGUnitObject& iUnit)
{
SKGError err;
......
......@@ -106,6 +106,12 @@ public:
*/
SKGAccountObject& operator= (const SKGObjectBase& iObject);
/**
* Operator affectation
* @param iObject the object to copy
*/
SKGAccountObject& operator= (const SKGAccountObject& iObject);
/**
* Destructor
*/
......
......@@ -62,6 +62,12 @@ SKGBankObject& SKGBankObject::operator= (const SKGObjectBase& iObject)
return *this;
}
SKGBankObject& SKGBankObject::operator= (const SKGBankObject& iObject)
{
copyFrom(iObject);
return *this;
}
SKGError SKGBankObject::addAccount(SKGAccountObject& oAccount)
{
SKGError err;
......
......@@ -68,6 +68,12 @@ public:
*/
SKGBankObject& operator= (const SKGObjectBase& iObject);
/**
* Operator affectation
* @param iObject the object to copy
*/
SKGBankObject& operator= (const SKGBankObject& iObject);
/**
* Destructor
*/
......
......@@ -54,6 +54,12 @@ SKGCategoryObject& SKGCategoryObject::operator= (const SKGObjectBase& iObject)
return *this;
}
SKGCategoryObject& SKGCategoryObject::operator= (const SKGCategoryObject& iObject)
{
copyFrom(iObject);
return *this;
}
SKGError SKGCategoryObject::setName(const QString& iName)
{
SKGError err;
......
......@@ -61,6 +61,12 @@ public:
*/
SKGCategoryObject& operator= (const SKGObjectBase& iObject);
/**
* Operator affectation
* @param iObject the object to copy
*/
SKGCategoryObject& operator= (const SKGCategoryObject& iObject);
/**
* Destructor
*/
......
......@@ -59,6 +59,12 @@ SKGOperationObject& SKGOperationObject::operator= (const SKGObjectBase& iObject)
return *this;
}
SKGOperationObject& SKGOperationObject::operator= (const SKGOperationObject& iObject)
{
copyFrom(iObject);
return *this;
}
SKGError SKGOperationObject::duplicate(SKGOperationObject& oOperation, QDate iDate, bool iTemplateMode) const
{
SKGError err;
......
......@@ -92,6 +92,12 @@ public:
*/
SKGOperationObject& operator= (const SKGObjectBase& iObject);
/**
* Operator affectation
* @param iObject the object to copy
*/
SKGOperationObject& operator= (const SKGOperationObject& iObject);
/**
* Destructor
*/
......
......@@ -55,6 +55,12 @@ SKGPayeeObject& SKGPayeeObject::operator= (const SKGObjectBase& iObject)
return *this;
}
SKGPayeeObject& SKGPayeeObject::operator= (const SKGPayeeObject& iObject)
{
copyFrom(iObject);
return *this;
}
SKGError SKGPayeeObject::createPayee(SKGDocumentBank* iDocument,
const QString& iName,
SKGPayeeObject& oPayee,
......
......@@ -63,6 +63,12 @@ public:
*/
SKGPayeeObject& operator= (const SKGObjectBase& iObject);
/**
* Operator affectation
* @param iObject the object to copy
*/
SKGPayeeObject& operator= (const SKGPayeeObject& iObject);
/**
* Destructor
*/
......
......@@ -55,6 +55,12 @@ SKGRecurrentOperationObject& SKGRecurrentOperationObject::operator= (const SKGOb
return *this;
}
SKGRecurrentOperationObject& SKGRecurrentOperationObject::operator= (const SKGRecurrentOperationObject& iObject)
{
copyFrom(iObject);
return *this;
}
SKGError SKGRecurrentOperationObject::getParentOperation(SKGOperationObject& oOperation) const
{
SKGObjectBase objTmp;
......
......@@ -76,6 +76,12 @@ public:
*/
SKGRecurrentOperationObject& operator= (const SKGObjectBase& iObject);
/**
* Operator affectation
* @param iObject the object to copy
*/
SKGRecurrentOperationObject& operator= (const SKGRecurrentOperationObject& iObject);
/**
* Destructor
*/
......
......@@ -55,6 +55,12 @@ SKGRuleObject& SKGRuleObject::operator= (const SKGObjectBase& iObject)
return *this;
}
SKGRuleObject& SKGRuleObject::operator= (const SKGRuleObject& iObject)
{
copyFrom(iObject);
return *this;
}
SKGRuleObject::~SKGRuleObject()
= default;
......
......@@ -104,6 +104,12 @@ public:
*/
SKGRuleObject& operator= (const SKGObjectBase& iObject);
/**
* Operator affectation
* @param iObject the object to copy
*/
SKGRuleObject& operator= (const SKGRuleObject& iObject);
/**
* Destructor
*/
......
......@@ -56,6 +56,12 @@ SKGSubOperationObject& SKGSubOperationObject::operator= (const SKGObjectBase& iO
return *this;
}
SKGSubOperationObject& SKGSubOperationObject::operator= (const SKGSubOperationObject& iObject)
{
copyFrom(iObject);
return *this;
}
SKGError SKGSubOperationObject::setDate(QDate iDate)
{
return setAttribute(QStringLiteral("d_date"), iDate.isValid() ? SKGServices::dateToSqlString(QDateTime(iDate)) : QLatin1String(""));
......
......@@ -64,6 +64,12 @@ public:
*/
SKGSubOperationObject& operator= (const SKGObjectBase& iObject);
/**
* Operator affectation
* @param iObject the object to copy
*/
SKGSubOperationObject& operator= (const SKGSubOperationObject& iObject);
/**
* Destructor
*/
......
......@@ -54,6 +54,12 @@ SKGTrackerObject& SKGTrackerObject::operator= (const SKGObjectBase& iObject)
return *this;
}
SKGTrackerObject& SKGTrackerObject::operator= (const SKGTrackerObject& iObject)
{
copyFrom(iObject);
return *this;
}
SKGError SKGTrackerObject::createTracker(SKGDocumentBank* iDocument,
const QString& iName,
SKGTrackerObject& oTracker,
......
......@@ -62,6 +62,12 @@ public:
*/
SKGTrackerObject& operator= (const SKGObjectBase& iObject);
/**
* Operator affectation
* @param iObject the object to copy
*/
SKGTrackerObject& operator= (const SKGTrackerObject& iObject);
/**
* Destructor
*/
......
......@@ -79,6 +79,13 @@ SKGUnitObject& SKGUnitObject::operator= (const SKGObjectBase& iObject)
return *this;
}
SKGUnitObject& SKGUnitObject::operator= (const SKGUnitObject& iObject)
{
copyFrom(iObject);
return *this;
}
QString SKGUnitObject::getWhereclauseId() const
{
QString output = SKGObjectBase::getWhereclauseId(); // clazy:exclude=skipped-base-method
......
......@@ -103,13 +103,18 @@ public:
*/
explicit SKGUnitObject(const SKGObjectBase& iObject);
/**
* Operator affectation
* @param iObject the object to copy
*/
SKGUnitObject& operator= (const SKGObjectBase& iObject);
/**
* Operator affectation
* @param iObject the object to copy
*/
SKGUnitObject& operator= (const SKGUnitObject& iObject);
/**
* Get unit information
* @return the unit information
......
......@@ -49,6 +49,12 @@ SKGUnitValueObject& SKGUnitValueObject::operator= (const SKGObjectBase& iObject)
return *this;
}
SKGUnitValueObject& SKGUnitValueObject::operator= (const SKGUnitValueObject& iObject)
{
copyFrom(iObject);
return *this;
}
SKGUnitValueObject::~SKGUnitValueObject()
= default;
......
......@@ -64,6 +64,12 @@ public:
*/
SKGUnitValueObject& operator= (const SKGObjectBase& iObject);
/**
* Operator affectation
* @param iObject the object to copy
*/
SKGUnitValueObject& operator= (const SKGUnitValueObject& iObject);
/**
* Destructor
*/
......
......@@ -308,7 +308,6 @@ static void regexpCaptureFunction(sqlite3_context* context, int /*argc*/, sqlite
int len3 = sqlite3_value_bytes16(argv[ 2 ]);
const void* data3 = sqlite3_value_text16(argv[ 2 ]);
if (Q_LIKELY(data1 && data2 && data3)) {
int pos = SKGServices::stringToInt(QString::fromRawData(reinterpret_cast<const QChar*>(data3), len3 / sizeof(QChar)));
QString string1(reinterpret_cast<const QChar*>(data1), len1 / sizeof(QChar));
......
......@@ -39,6 +39,12 @@ SKGNamedObject& SKGNamedObject::operator= (const SKGObjectBase& iObject)
return *this;
}
SKGNamedObject& SKGNamedObject::operator= (const SKGNamedObject& iObject)
{
copyFrom(iObject);
return *this;
}
SKGNamedObject::~SKGNamedObject()
= default;
......
......@@ -83,6 +83,12 @@ public:
*/
SKGNamedObject& operator= (const SKGObjectBase& iObject);
/**
* Operator affectation
* @param iObject the object to copy
*/
SKGNamedObject& operator= (const SKGNamedObject& iObject);
/**
* Destructor
*/
......
......@@ -49,6 +49,12 @@ SKGNodeObject& SKGNodeObject::operator= (const SKGObjectBase& iObject)
return *this;
}
SKGNodeObject& SKGNodeObject::operator= (const SKGNodeObject& iObject)
{
copyFrom(iObject);
return *this;
}
SKGError SKGNodeObject::setName(const QString& iName)
{
SKGError err;
......
......@@ -80,6 +80,12 @@ public:
*/
SKGNodeObject& operator= (const SKGObjectBase& iObject);
/**
* Operator affectation
* @param iObject the object to copy
*/
SKGNodeObject& operator= (const SKGNodeObject& iObject);
/**
* Destructor
*/
......
......@@ -42,6 +42,12 @@ SKGPropertyObject& SKGPropertyObject::operator= (const SKGObjectBase& iObject)
return *this;
}
SKGPropertyObject& SKGPropertyObject::operator= (const SKGPropertyObject& iObject)
{
copyFrom(iObject);
return *this;
}
SKGError SKGPropertyObject::setParentId(const QString& iParentId)
{
return setAttribute(QStringLiteral("t_uuid_parent"), iParentId);
......
......@@ -70,6 +70,12 @@ public:
*/
SKGPropertyObject& operator= (const SKGObjectBase& iObject);
/**
* Operator affectation
* @param iObject the object to copy
*/
SKGPropertyObject& operator= (const SKGPropertyObject& iObject);
/**
* Destructor
*/
......
......@@ -518,7 +518,7 @@ QDate SKGServices::partialStringToDate(const QString& iDateString, bool iFixupBa
if (size == 1) {
int dayCount = items.at(0).toInt(&ok);
result = QDate(QDate::currentDate().year(), QDate::currentDate().month(), dayCount); ;
result = QDate(QDate::currentDate().year(), QDate::currentDate().month(), dayCount);
if (iFixupBackward) {
if (result > QDate::currentDate()) {
......@@ -533,7 +533,7 @@ QDate SKGServices::partialStringToDate(const QString& iDateString, bool iFixupBa
int dayCount = items.at(0).toInt(&ok);
int monthCount = items.at(1).toInt(&ok);
result = QDate(QDate::currentDate().year(), monthCount, dayCount); ;
result = QDate(QDate::currentDate().year(), monthCount, dayCount);
if (iFixupBackward) {
if (result > QDate::currentDate()) {
......@@ -550,7 +550,7 @@ QDate SKGServices::partialStringToDate(const QString& iDateString, bool iFixupBa
int yearCount = items.at(2).toInt(&ok);
int lengthYear = items.at(2).count();
result = QDate(QDate::currentDate().year(), monthCount, dayCount); ;
result = QDate(QDate::currentDate().year(), monthCount, dayCount);
if (lengthYear < 4) {
auto y = static_cast<int>(result.year() / qPow(10, lengthYear)) * qPow(10, lengthYear) + yearCount;
......@@ -1987,7 +1987,6 @@ QIcon SKGServices::fromTheme(const QString& iName, const QStringList& iOverlays)
alternatives[QStringLiteral("format-precision-less")] = QStringLiteral("visibility");
alternatives[QStringLiteral("format-indent-more")] = QStringLiteral("go-next");
alternatives[QStringLiteral("format-indent-less")] = QStringLiteral("go-previous");
}
bool alternativeEmpty = false;
if (alternatives.contains(iName)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment