From 008fb06a3e7170bf222056d9737776386dfa44d4 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Mon, 9 May 2022 22:36:08 +0200 Subject: [PATCH] Code cleanup --- src/laybasic/laybasic/layDitherPattern.cc | 17 ----------------- src/laybasic/laybasic/layDitherPattern.h | 15 --------------- 2 files changed, 32 deletions(-) diff --git a/src/laybasic/laybasic/layDitherPattern.cc b/src/laybasic/laybasic/layDitherPattern.cc index 243f8a5e0..ede9eee47 100644 --- a/src/laybasic/laybasic/layDitherPattern.cc +++ b/src/laybasic/laybasic/layDitherPattern.cc @@ -777,9 +777,6 @@ struct ReplaceDitherPatternOp }; DitherPattern::DitherPattern () : -#if defined(HAVE_QT) - QObject (), -#endif db::Object (0) { for (unsigned int d = 0; d < sizeof (dither_strings) / sizeof (dither_strings [0]); d += 2) { @@ -795,9 +792,6 @@ DitherPattern::~DitherPattern () } DitherPattern::DitherPattern (const DitherPattern &p) : -#if defined(HAVE_QT) - QObject (), -#endif db::Object (0) { m_pattern = p.m_pattern; @@ -844,11 +838,8 @@ DitherPattern::pattern (unsigned int i) const void DitherPattern::replace_pattern (unsigned int i, const DitherPatternInfo &p) { - bool chg = false; - while (i >= count ()) { m_pattern.push_back (DitherPatternInfo ()); - chg = true; } if (m_pattern [i] != p) { @@ -856,14 +847,6 @@ DitherPattern::replace_pattern (unsigned int i, const DitherPatternInfo &p) manager ()->queue (this, new ReplaceDitherPatternOp (i, m_pattern [i], p)); } m_pattern [i] = p; - chg = true; - } - - // if something has changed emit the signal - if (chg) { -#if defined(HAVE_QT) - emit changed (); -#endif } } diff --git a/src/laybasic/laybasic/layDitherPattern.h b/src/laybasic/laybasic/layDitherPattern.h index de1e88ca8..9c86eb2e1 100644 --- a/src/laybasic/laybasic/layDitherPattern.h +++ b/src/laybasic/laybasic/layDitherPattern.h @@ -230,15 +230,8 @@ private: * cannot be changed. */ class LAYBASIC_PUBLIC DitherPattern : -#if defined(HAVE_QT) - public QObject, -#endif public db::Object { -#if defined(HAVE_QT) -Q_OBJECT -#endif - public: typedef std::vector pattern_vector; typedef pattern_vector::const_iterator iterator; @@ -384,14 +377,6 @@ public: */ static const DitherPattern &default_pattern (); -#if defined(HAVE_QT) -signals: - /** - * @brief This signal is emitted if a pattern is changed - */ - void changed (); -#endif - private: std::vector m_pattern; };