Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
73790d0
COMP: Need full definitions not forward declarations
hjmjohnson Jul 7, 2025
4599386
PERF: Replace non-POD global statics with lazy initialization (clazy …
hjmjohnson Mar 21, 2026
d8eeaae
STYLE: Wrap location manager globals in Q_GLOBAL_STATIC (clazy non-po…
hjmjohnson Mar 22, 2026
d6bd4d0
PERF: Pass non-trivial types by const-ref instead of by value (clazy …
hjmjohnson Mar 22, 2026
15d73a9
PERF: Pass trivially-copyable types by value instead of const-ref (cl…
hjmjohnson Mar 29, 2026
80e8173
ENH: Increase timeout for slow EventTranslatorPlayer tests
hjmjohnson Mar 30, 2026
84fa884
STYLE: Disable tests that hang on modal dialogs (ModalDialogHang)
hjmjohnson Mar 30, 2026
403b32b
BUG: Write test screenshot output to build tree, not source tree
hjmjohnson Mar 30, 2026
f373ee8
BUG: Fix ctkPathLineEditEventTranslatorPlayerTest1 XML validation
hjmjohnson Mar 30, 2026
5daeeeb
BUG: Add missing XML events for ctkVTKScalarBarWidgetEventTranslatorP…
hjmjohnson Mar 30, 2026
3deb7d2
BUG: Fix ctkVTKThresholdWidget threshold lost after setRange
hjmjohnson Mar 30, 2026
c7c8f4a
BUG: Fix ctkLanguageComboBox locale normalization and selection
hjmjohnson Mar 30, 2026
9734fbf
STYLE: Fix emit keyword placement on signal calls (clazy incorrect-emit)
hjmjohnson Mar 22, 2026
84838d3
BUG: Fix ctkVTKMagnifyViewTest2 baseline comparison failures
hjmjohnson Mar 31, 2026
aa9b821
BUG: Handle set_edit_string command in ctkMenuComboBoxEventPlayer
hjmjohnson Mar 31, 2026
94f1d24
BUG: Skip covered-widget grab check on software renderers
hjmjohnson Mar 31, 2026
9561739
BUG: Fix vtkLightBoxRendererManagerTest1 SEGFAULT and image threshold
hjmjohnson Mar 31, 2026
85941fe
BUG: Fix ctkWorkflowWidgetTest1/2 failures on Qt6
hjmjohnson Mar 31, 2026
a66439d
BUG: Disable QT_FATAL_WARNINGS for CTKPluginFrameworkAppTests on Qt6
hjmjohnson Mar 31, 2026
0add7f4
BUG: Fix ctkVTKMagnifyViewTest2 failures on Qt6
hjmjohnson Mar 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMake/ctkWrapPythonQt.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def ctk_wrap_pythonqt(target, namespace, output_dir, input_files, extra_verbose)

# Skip wrapping if object has a virtual pure method
# "x3b" is the unicode for semicolon
regex = r"virtual[\w\n\s\*\(\)]+\=[\s\n]*(0|NULL|nullptr)[\s\n]*\x3b"
regex = r"virtual[\w\n\s\*\&\(\),:<>]+\=[\s\n]*(0|NULL|nullptr)[\s\n]*\x3b"
res = re.search(regex, content, re.MULTILINE)
if res is not None:
if extra_verbose:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,26 @@

namespace {

static QString PREFIX_EXECUTABLE = "executable:";
static QString PREFIX_PARAMETER_GROUP = "paramGroup:";
static QString PREFIX_PARAMETER_CONTAINER = "paramContainer:";
static QString PREFIX_PARAMETER = "parameter:";
static const QString& PREFIX_EXECUTABLE()
Comment thread
hjmjohnson marked this conversation as resolved.
{
static const QString s = QStringLiteral("executable:");
return s;
}
static const QString& PREFIX_PARAMETER_GROUP()
{
static const QString s = QStringLiteral("paramGroup:");
return s;
}
static const QString& PREFIX_PARAMETER_CONTAINER()
{
static const QString s = QStringLiteral("paramContainer:");
return s;
}
static const QString& PREFIX_PARAMETER()
{
static const QString s = QStringLiteral("parameter:");
return s;
}

}

Expand Down Expand Up @@ -93,10 +109,10 @@ QString ctkCmdLineModuleObjectTreeWalker::name() const
if (CurrentObject == 0) return QString();
switch(CurrentToken)
{
case Executable: return CurrentObject->objectName().mid(PREFIX_EXECUTABLE.size());
case ParameterGroup: return CurrentObject->objectName().mid(PREFIX_PARAMETER_GROUP.size());
case ParameterContainer: return CurrentObject->objectName().mid(PREFIX_PARAMETER_CONTAINER.size());
case Parameter: return CurrentObject->objectName().mid(PREFIX_PARAMETER.size());
case Executable: return CurrentObject->objectName().mid(PREFIX_EXECUTABLE().size());
case ParameterGroup: return CurrentObject->objectName().mid(PREFIX_PARAMETER_GROUP().size());
case ParameterContainer: return CurrentObject->objectName().mid(PREFIX_PARAMETER_CONTAINER().size());
case Parameter: return CurrentObject->objectName().mid(PREFIX_PARAMETER().size());
default: return QString();
}
}
Expand All @@ -107,7 +123,7 @@ QString ctkCmdLineModuleObjectTreeWalker::label() const
if (CurrentObject == 0) return QString();
switch(CurrentToken)
{
case Executable: return CurrentObject->objectName().mid(PREFIX_EXECUTABLE.size());
case Executable: return CurrentObject->objectName().mid(PREFIX_EXECUTABLE().size());
case ParameterGroup: return property("title").toString();
case ParameterContainer: return property("name").toString();
case Parameter: return property("label").toString();
Expand Down Expand Up @@ -276,10 +292,10 @@ QVariant ctkCmdLineModuleObjectTreeWalker::prefixedProperty(const QString& propN
QString prefixedName;
switch(CurrentToken)
{
case ctkCmdLineModuleObjectTreeWalker::Executable: prefixedName = PREFIX_EXECUTABLE + propName; break;
case ctkCmdLineModuleObjectTreeWalker::ParameterGroup: prefixedName = PREFIX_PARAMETER_GROUP + propName; break;
case ctkCmdLineModuleObjectTreeWalker::ParameterContainer: prefixedName = PREFIX_PARAMETER_CONTAINER + propName; break;
case ctkCmdLineModuleObjectTreeWalker::Parameter: prefixedName = PREFIX_PARAMETER + propName; break;
case ctkCmdLineModuleObjectTreeWalker::Executable: prefixedName = PREFIX_EXECUTABLE() + propName; break;
case ctkCmdLineModuleObjectTreeWalker::ParameterGroup: prefixedName = PREFIX_PARAMETER_GROUP() + propName; break;
case ctkCmdLineModuleObjectTreeWalker::ParameterContainer: prefixedName = PREFIX_PARAMETER_CONTAINER() + propName; break;
case ctkCmdLineModuleObjectTreeWalker::Parameter: prefixedName = PREFIX_PARAMETER() + propName; break;
default: ;
}

Expand All @@ -292,10 +308,10 @@ ctkCmdLineModuleObjectTreeWalker::token(QObject* obj)
{
if (obj == 0) return ctkCmdLineModuleObjectTreeWalker::NoToken;
QString name = obj->objectName();
if (name.startsWith(PREFIX_EXECUTABLE)) return ctkCmdLineModuleObjectTreeWalker::Executable;
if (name.startsWith(PREFIX_PARAMETER_GROUP)) return ctkCmdLineModuleObjectTreeWalker::ParameterGroup;
if (name.startsWith(PREFIX_PARAMETER_CONTAINER)) return ctkCmdLineModuleObjectTreeWalker::ParameterContainer;
if (name.startsWith(PREFIX_PARAMETER)) return ctkCmdLineModuleObjectTreeWalker::Parameter;
if (name.startsWith(PREFIX_EXECUTABLE())) return ctkCmdLineModuleObjectTreeWalker::Executable;
if (name.startsWith(PREFIX_PARAMETER_GROUP())) return ctkCmdLineModuleObjectTreeWalker::ParameterGroup;
if (name.startsWith(PREFIX_PARAMETER_CONTAINER())) return ctkCmdLineModuleObjectTreeWalker::ParameterContainer;
if (name.startsWith(PREFIX_PARAMETER())) return ctkCmdLineModuleObjectTreeWalker::Parameter;
return ctkCmdLineModuleObjectTreeWalker::NoToken;
}

Expand Down
2 changes: 1 addition & 1 deletion Libs/Core/ctkAbstractFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class ctkAbstractFactory

protected:

void displayStatusMessage(const QtMsgType& type, const QString& description,
void displayStatusMessage(QtMsgType type, const QString& description,
const QString& status, bool display);

/// \brief Call the load method associated with the item.
Expand Down
2 changes: 1 addition & 1 deletion Libs/Core/ctkAbstractFactory.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ QStringList ctkAbstractFactory<BaseClassType>::itemKeys() const
//----------------------------------------------------------------------------
template<typename BaseClassType>
void ctkAbstractFactory<BaseClassType>::displayStatusMessage(
const QtMsgType& type, const QString& description, const QString& status, bool display)
QtMsgType type, const QString& description, const QString& status, bool display)
{
QString msg = QString("%1 [%2]").arg(description + " ", -70, QChar('.')).arg(status);
if (display)
Expand Down
6 changes: 3 additions & 3 deletions Libs/Core/ctkAbstractJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ QThread::Priority ctkAbstractJob::priority() const
}

//----------------------------------------------------------------------------
void ctkAbstractJob::setPriority(const QThread::Priority &priority)
void ctkAbstractJob::setPriority(QThread::Priority priority)
{
this->Priority = priority;
}
Expand Down Expand Up @@ -208,7 +208,7 @@ QString ctkAbstractJob::runningThreadID() const
}

//----------------------------------------------------------------------------
void ctkAbstractJob::setRunningThreadID(QString runningThreadID)
void ctkAbstractJob::setRunningThreadID(const QString& runningThreadID)
{
this->RunningThreadID = runningThreadID;
}
Expand All @@ -220,7 +220,7 @@ QString ctkAbstractJob::log() const
}

//----------------------------------------------------------------------------
void ctkAbstractJob::addLog(QString log)
void ctkAbstractJob::addLog(const QString& log)
{
this->Log += log;
}
Expand Down
6 changes: 3 additions & 3 deletions Libs/Core/ctkAbstractJob.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class CTK_CORE_EXPORT ctkAbstractJob : public QObject
///@{
/// Priority
QThread::Priority priority() const;
void setPriority(const QThread::Priority& priority);
void setPriority(QThread::Priority priority);
///@}

///@{
Expand All @@ -153,13 +153,13 @@ class CTK_CORE_EXPORT ctkAbstractJob : public QObject
///@{
/// Running ThreadID
QString runningThreadID() const;
void setRunningThreadID(QString runningThreadID);
void setRunningThreadID(const QString& runningThreadID);
///@}

///@{
/// Logged Text
QString log() const;
void addLog(QString log);
void addLog(const QString& log);
///@}

/// Generate worker for job
Expand Down
2 changes: 1 addition & 1 deletion Libs/Core/ctkAbstractWorker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void ctkAbstractWorker::startNextJob()
}

//----------------------------------------------------------------------------
void ctkAbstractWorker::onJobCanceled(const bool& wasCanceled)
void ctkAbstractWorker::onJobCanceled(bool wasCanceled)
{
if (!this->Job)
{
Expand Down
2 changes: 1 addition & 1 deletion Libs/Core/ctkAbstractWorker.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class CTK_CORE_EXPORT ctkAbstractWorker : public QObject, public QRunnable
public slots:
/// These slots are thread safe
virtual void startNextJob();
virtual void onJobCanceled(const bool& wasCanceled);
virtual void onJobCanceled(bool wasCanceled);

protected:
QSharedPointer<ctkAbstractJob> Job;
Expand Down
4 changes: 2 additions & 2 deletions Libs/Core/ctkErrorLogAbstractModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ ctkErrorLogTerminalOutput::TerminalOutputs ctkErrorLogAbstractModel::terminalOut

//------------------------------------------------------------------------------
void ctkErrorLogAbstractModel::setTerminalOutputs(
const ctkErrorLogTerminalOutput::TerminalOutputs& terminalOutput)
ctkErrorLogTerminalOutput::TerminalOutputs terminalOutput)
{
Q_D(ctkErrorLogAbstractModel);
d->StdErrTerminalOutput.setEnabled(terminalOutput & ctkErrorLogTerminalOutput::StandardOutput);
Expand Down Expand Up @@ -370,7 +370,7 @@ void ctkErrorLogAbstractModel::clear()
}

//------------------------------------------------------------------------------
void ctkErrorLogAbstractModel::filterEntry(const ctkErrorLogLevel::LogLevels& logLevel,
void ctkErrorLogAbstractModel::filterEntry(ctkErrorLogLevel::LogLevels logLevel,
bool disableFilter)
{
Q_D(ctkErrorLogAbstractModel);
Expand Down
4 changes: 2 additions & 2 deletions Libs/Core/ctkErrorLogAbstractModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ class CTK_CORE_EXPORT ctkErrorLogAbstractModel : public QSortFilterProxyModel
/// Set terminal output mode
/// \sa terminalOutputs()
/// \sa TerminalOutput
void setTerminalOutputs(const ctkErrorLogTerminalOutput::TerminalOutputs& terminalOutput);
void setTerminalOutputs(ctkErrorLogTerminalOutput::TerminalOutputs terminalOutput);

ctkErrorLogLevel::LogLevels logLevelFilter()const;

void filterEntry(const ctkErrorLogLevel::LogLevels& logLevel = ctkErrorLogLevel::Unknown, bool disableFilter = false);
void filterEntry(ctkErrorLogLevel::LogLevels logLevel = ctkErrorLogLevel::Unknown, bool disableFilter = false);

bool logEntryGrouping()const;
void setLogEntryGrouping(bool value);
Expand Down
37 changes: 19 additions & 18 deletions Libs/Core/ctkJobScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
#include "ctkJobScheduler.h"
#include "ctkAbstractWorker.h"
#include "ctkLogger.h"
#include <QGlobalStatic>

static ctkLogger logger("org.commontk.core.AbstractScheduler");
Q_GLOBAL_STATIC_WITH_ARGS(ctkLogger, logger, ("org.commontk.core.AbstractScheduler"))

// --------------------------------------------------------------------------
// ctkJobSchedulerPrivate methods
Expand Down Expand Up @@ -114,7 +115,7 @@ void ctkJobSchedulerPrivate::queueJobsInThreadPool()
return;
}

logger.debug(QString("ctkDICOMScheduler: creating worker for job %1 in thread %2.\n")
logger->debug(QString("ctkDICOMScheduler: creating worker for job %1 in thread %2.\n")
.arg(job->jobUID())
.arg(QString::number(reinterpret_cast<quint64>(QThread::currentThreadId())), 16));

Expand Down Expand Up @@ -143,14 +144,14 @@ bool ctkJobSchedulerPrivate::insertJob(QSharedPointer<ctkAbstractJob> job)

if (this->FreezeJobsScheduling)
{
logger.debug(QString("ctkJobScheduler: job object %1 of type %2 in thread %3 "
logger->debug(QString("ctkJobScheduler: job object %1 of type %2 in thread %3 "
"not added to the job list since jobs are being stopped.\n")
.arg(job->jobUID(), job->className())
.arg(QString::number(reinterpret_cast<quint64>(QThread::currentThreadId())), 16));
return false;
}

logger.debug(QString("ctkJobScheduler: creating job object %1 of type %2 in thread %3.\n")
logger->debug(QString("ctkJobScheduler: creating job object %1 of type %2 in thread %3.\n")
.arg(job->jobUID(), job->className())
.arg(QString::number(reinterpret_cast<quint64>(QThread::currentThreadId())), 16));

Expand Down Expand Up @@ -185,7 +186,7 @@ bool ctkJobSchedulerPrivate::insertJob(QSharedPointer<ctkAbstractJob> job)

emit q->jobInitialized(job->toVariant());

logger.debug(QString("ctkDICOMScheduler: creating worker for job %1 in thread %2.\n")
logger->debug(QString("ctkDICOMScheduler: creating worker for job %1 in thread %2.\n")
.arg(job->jobUID())
.arg(QString::number(reinterpret_cast<quint64>(QThread::currentThreadId())), 16));

Expand All @@ -203,7 +204,7 @@ bool ctkJobSchedulerPrivate::insertJob(QSharedPointer<ctkAbstractJob> job)
return false;
}

logger.debug(QString("ctkDICOMScheduler: creating worker for job %1 in thread %2.\n")
logger->debug(QString("ctkDICOMScheduler: creating worker for job %1 in thread %2.\n")
.arg(job->jobUID())
.arg(QString::number(reinterpret_cast<quint64>(QThread::currentThreadId())), 16));

Expand All @@ -223,7 +224,7 @@ bool ctkJobSchedulerPrivate::insertJob(QSharedPointer<ctkAbstractJob> job)
//------------------------------------------------------------------------------
bool ctkJobSchedulerPrivate::cleanJob(const QString &jobUID)
{
logger.debug(QString("ctkJobScheduler: deleting job object %1 in thread %2.\n")
logger->debug(QString("ctkJobScheduler: deleting job object %1 in thread %2.\n")
.arg(jobUID, QString::number(reinterpret_cast<quint64>(QThread::currentThreadId()), 16)));

{
Expand Down Expand Up @@ -273,7 +274,7 @@ void ctkJobSchedulerPrivate::cleanJobs(const QStringList &jobUIDs)
//------------------------------------------------------------------------------
bool ctkJobSchedulerPrivate::removeJob(const QString& jobUID)
{
logger.debug(QString("ctkJobScheduler: deleting job object %1 in thread %2.\n")
logger->debug(QString("ctkJobScheduler: deleting job object %1 in thread %2.\n")
.arg(jobUID, QString::number(reinterpret_cast<quint64>(QThread::currentThreadId()), 16)));

{
Expand Down Expand Up @@ -405,11 +406,11 @@ ctkJobScheduler::~ctkJobScheduler()
}

//------------------------------------------------------------------------------
CTK_SET_CPP(ctkJobScheduler, const bool&, setFreezeJobsScheduling, FreezeJobsScheduling);
CTK_SET_CPP(ctkJobScheduler, bool, setFreezeJobsScheduling, FreezeJobsScheduling);
CTK_GET_CPP(ctkJobScheduler, bool, freezeJobsScheduling, FreezeJobsScheduling)
CTK_SET_CPP(ctkJobScheduler, const int&, setMaximumNumberOfRetry, MaximumNumberOfRetry);
CTK_SET_CPP(ctkJobScheduler, int, setMaximumNumberOfRetry, MaximumNumberOfRetry);
CTK_GET_CPP(ctkJobScheduler, int, maximumNumberOfRetry, MaximumNumberOfRetry)
CTK_SET_CPP(ctkJobScheduler, const int&, setRetryDelay, RetryDelay);
CTK_SET_CPP(ctkJobScheduler, int, setRetryDelay, RetryDelay);
CTK_GET_CPP(ctkJobScheduler, int, retryDelay, RetryDelay)

//----------------------------------------------------------------------------
Expand Down Expand Up @@ -777,7 +778,7 @@ int ctkJobScheduler::maximumThreadCount() const
}

//----------------------------------------------------------------------------
void ctkJobScheduler::setMaximumThreadCount(const int& maximumThreadCount)
void ctkJobScheduler::setMaximumThreadCount(int maximumThreadCount)
{
Q_D(ctkJobScheduler);
d->ThreadPool->setMaxThreadCount(maximumThreadCount);
Expand Down Expand Up @@ -806,7 +807,7 @@ void ctkJobScheduler::onJobStarted(ctkAbstractJob* job)
return;
}

logger.debug(job->loggerReport(tr("started")));
logger->debug(job->loggerReport(tr("started")));

d->BatchedJobsStarted.append(job->toVariant());
if (!d->ThrottleTimer->isActive())
Expand All @@ -824,7 +825,7 @@ void ctkJobScheduler::onJobUserStopped(ctkAbstractJob* job)
return;
}

logger.debug(job->loggerReport(tr("user stopped")));
logger->debug(job->loggerReport(tr("user stopped")));

QString jobUID = job->jobUID();
this->deleteWorker(jobUID);
Expand Down Expand Up @@ -853,7 +854,7 @@ void ctkJobScheduler::onJobFinished(ctkAbstractJob* job)
return;
}

logger.debug(job->loggerReport(tr("finished")));
logger->debug(job->loggerReport(tr("finished")));

QString jobUID = job->jobUID();
this->deleteWorker(jobUID);
Expand Down Expand Up @@ -882,7 +883,7 @@ void ctkJobScheduler::onJobAttemptFailed(ctkAbstractJob* job)
return;
}

logger.debug(job->loggerReport(tr("attempt failed")));
logger->debug(job->loggerReport(tr("attempt failed")));

QString jobUID = job->jobUID();
this->deleteWorker(jobUID);
Expand Down Expand Up @@ -911,7 +912,7 @@ void ctkJobScheduler::onJobFailed(ctkAbstractJob* job)
return;
}

logger.debug(job->loggerReport(tr("failed")));
logger->debug(job->loggerReport(tr("failed")));

QString jobUID = job->jobUID();
this->deleteWorker(jobUID);
Expand All @@ -932,7 +933,7 @@ void ctkJobScheduler::onJobFailed(ctkAbstractJob* job)
}

//----------------------------------------------------------------------------
void ctkJobScheduler::onProgressJobDetail(QVariant data)
void ctkJobScheduler::onProgressJobDetail(const QVariant& data)
{
Q_D(ctkJobScheduler);

Expand Down
Loading
Loading