1. 21 Nov, 2020 1 commit
    • Zoltan Padrah's avatar
      color utils: fix compilation on Qt < 5.14 · 2b19a9c6
      Zoltan Padrah authored
      apparently the commented line fails to compile,
      colorutils.cpp:91:66: error: no matching function for
      call to ‘QList<QColor>::QList(QColor*&, QColor*)’
      
      examples of affected distributions: Ubuntu 20.40, 18.04
      2b19a9c6
  2. 15 Nov, 2020 7 commits
    • Pino Toscano's avatar
      Start to use qDeleteAll · 90ebf27c
      Pino Toscano authored
      Start to use qDeleteAll to ease the invocation of delete on all the
      items of a container.
      90ebf27c
    • Pino Toscano's avatar
      Drop support for gpsim < 0.26 · 99853064
      Pino Toscano authored
      gpsim 0.26 was released in 2011, so we can safely assume that any
      version greater than that is available in distributions.
      
      Also assume that the gpsim headers do not need the "config.h kludge"
      anymore.
      99853064
    • Pino Toscano's avatar
      Drop endl from the end of debug messages · d116c33f
      Pino Toscano authored
      Since Qt4, QDebug already adds a newline at the end of a message stream.
      d116c33f
    • Pino Toscano's avatar
      Include element.h for the uint typedef · c13039e9
      Pino Toscano authored
      Fixes #6
      c13039e9
    • Pino Toscano's avatar
      Drop LogToFileMsgHandler · a7a21c4d
      Pino Toscano authored
      Qt's logging messages can be tweaked by setting a message pattern (e.g.
      using the QT_MESSAGE_PATTERN environment variable), and by selecting
      which categories&severities to show (e.g. using logging rules).
      Hence drop the custom logger: now ktechlab will not unconditionally
      write log files in /tmp (hardcoded, even) by default, but it can be run
      to print the debug.
      a7a21c4d
    • Pino Toscano's avatar
      Convert DoubleSpinBox to an own logging category · fbbf2d5c
      Pino Toscano authored
      Add a separate logging category for DoubleSpinBox, just like its has
      its own debug stream.
      
      While changing the messages, drop the Q_FUNC_INFO marker, as it can be
      automatically produced by setting a logging message pattern.
      fbbf2d5c
    • Pino Toscano's avatar
      Convert most of ktechlab to categorized logging · df92889f
      Pino Toscano authored
      Use the ecm_qt_declare_logging_category cmake macro from the
      ECMQtDeclareLoggingCategory module to autogenerate a ktechlab_debug.h
      header with a logging/debug category to use in messages.
      Switch almost all the qDebug/qWarning/qCritical to their categorized
      counterparts, with few exceptions:
      - the microbe tool
      - the DoubleSpinBox widget, which will get its own category
      - a qFatal in ktlqt3support
      
      While changing the messages, drop the Q_FUNC_INFO marker, as it can be
      automatically produced by setting a logging message pattern.
      df92889f
  3. 14 Nov, 2020 1 commit
  4. 07 Nov, 2020 1 commit
  5. 05 Nov, 2020 16 commits
    • Pino Toscano's avatar
      text document: fix mode changing · 438912ae
      Pino Toscano authored
      Do not try to set only the highlighting mode, but directly the mode.
      Also, simplify the mode lookup: instead of removing all the moves from
      the list until the right one is found, simply search in the list.
      438912ae
    • Pino Toscano's avatar
      text view: disable kte::view internal widget lookuo · e3da4535
      Pino Toscano authored
      The internal structure changed, so the requested widget does not exist
      anymore as it was. For now disable the "hack", leaving a comment with
      the situation.
      
      At least this allow text views to work.
      e3da4535
    • Pino Toscano's avatar
      Use the KConfig as parameter · a72ef8c7
      Pino Toscano authored
      Updates commit 9cff44e8
      a72ef8c7
    • Pino Toscano's avatar
      Initialize PicItem::m_pressed · a97361c0
      Pino Toscano authored
      a97361c0
    • Pino Toscano's avatar
      Call the base constructor with the parent · a39ff5d1
      Pino Toscano authored
      This way it is properly deleted by the parent, and not leaked.
      a39ff5d1
    • Pino Toscano's avatar
      gpsim processor: fix dangling memory · cff461d5
      Pino Toscano authored
      Make sure to store the QByteArray with the local string representation
      as such, instead of storing the char char* to its internal
      representation that will be dangling right after the function ends.
      
      Related changes:
      - use QFile::encodeName() to convert from QString to a local system
        representation, instead of toAscii()
      - pass the QString directly to QDebug, as it is fine like that
      cff461d5
    • Pino Toscano's avatar
      Fix crash when opening a document using KRecentFilesAction · 54df0dbb
      Pino Toscano authored
      When opening a document from the slot triggered by KRecentFilesAction,
      it is a bad idea to call functions of the same KRecentFilesAction that
      triggered it, leading to corruption/crash.
      
      As solution, split the loading of files from KRecentFilesAction to a
      separate slot, different than the general function used for loading
      files: this way, that code path will not call back functions of
      KRecentFilesAction. An helper function helps sharing the common code.
      54df0dbb
    • Pino Toscano's avatar
      Remove almost all the 'const char *name' params · 822802ab
      Pino Toscano authored
      This was needed up to Qt 3, because the only way to set an object name
      was to pass it to the QObject constructor. Qt 4 and on is way more
      flexible about this, allowing to change an object name anytime.
      
      Hence, remove almost all the 'const char *name' parameters in
      constructors, and functions that end up invoking constructors; instead,
      the object name is set mostly by the caller.
      
      Exceptions to this mass change:
      - ktlqt3support (which is mostly Qt 3 bits)
      - SettingsDlg, as it is needed for KConfigDialog
      822802ab
    • Pino Toscano's avatar
      Drop DrawingPushButton · 64c7d1e1
      Pino Toscano authored
      No more needed, QPushButton does already its job.
      64c7d1e1
    • Pino Toscano's avatar
      DrawingPushButton -> QPushButton · 504b18ed
      Pino Toscano authored
      QPushButton can show a pixmap just fine, so there is no need for a
      special QPushButton subclass. Let's set the icon size we want, and
      the pixmap-as-icon will be shown automatically.
      
      Also get rid of the manual calls to update(), as changes to the
      properties of a widget already trigger its update (since Qt 4 already,
      IIRC).
      504b18ed
    • Pino Toscano's avatar
      Drop ColorCombo · a5621526
      Pino Toscano authored
      No more needed now, as ColorUtils covers everything it did.
      a5621526
    • Pino Toscano's avatar
      Switch from ColorCombo to ColorUtils + KColorCombo · 6bfcb84e
      Pino Toscano authored
      Use the new ColorUtils namespace for the ColorScheme enum, and for
      creating a KColorCombo with a color scheme.
      6bfcb84e
    • Pino Toscano's avatar
      Introduce ColorUtils · b280374e
      Pino Toscano authored
      Add an helper ColorUtils namespace with what is useful from ColorCombo:
      - the ColorScheme enum
      - an internal ColorCombo implementation, done only the sole purpose of
        having setColor() as slot
      - a function to create a ColorCombo (exposing it as KColorCombo, so
        ColorCombo stays internal) with a specified ColorScheme
      
      This way there will be no need to have an own buggy reimplementation of
      KColorCombo.
      b280374e
    • Pino Toscano's avatar
      Drop ktlFindQObjectChild · b3336f8b
      Pino Toscano authored
      No more needed now.
      b3336f8b
    • Pino Toscano's avatar
      Directly use QObject::findChild() · d759f27a
      Pino Toscano authored
      It can already search in direct and indirect children of the specified
      object.
      d759f27a
    • Script Kiddy's avatar
      GIT_SILENT made messages (after extraction) · ac6062fd
      Script Kiddy authored
      ac6062fd
  6. 04 Nov, 2020 11 commits
  7. 02 Nov, 2020 3 commits
    • Pino Toscano's avatar
      Drop RecentFilesAction · f9c40d57
      Pino Toscano authored
      No more needed now, properly replaced by KRecentFilesAction.
      f9c40d57
    • Pino Toscano's avatar
      Use KRecentFilesAction · 9cff44e8
      Pino Toscano authored
      Use KRecentFilesAction instead of the homebrew RecentFilesAction.
      The latter is a very old copy of KRecentFilesAction from kdelibs,
      "adapted to work around strange bug occuring". Sadly there is not much
      about the bug being worked around, so we assume it is no more there
      after more than 13 years.
      
      There is a bit of code duplication wrt the save & loading of entries,
      since the KConfig handling done by KRecentFilesAction is more generic.
      9cff44e8
    • Pino Toscano's avatar
      Require and link to KConfigWidgets · 84921e6c
      Pino Toscano authored
      It will be used soon for KRecentFilesAction.
      84921e6c