Commit 6a4bdb34 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Clean up code

parent 52f475d8
......@@ -57,7 +57,7 @@ void ConfigurationDialog::setupLogModeConfigurations()
const auto logModes = Globals::instance().logModes();
for (LogMode *logMode : logModes) {
// Some Log mode does not need a configuration widget
if (logMode->logModeConfigurationWidget() == nullptr) {
if (!logMode->logModeConfigurationWidget()) {
continue;
}
......
......@@ -66,7 +66,7 @@ void Analyzer::setParsingPaused(bool paused)
void Analyzer::setLogViewModel(LogViewModel *logViewModel)
{
this->mLogViewModel = logViewModel;
mLogViewModel = logViewModel;
}
void Analyzer::informOpeningProgress(int currentPosition, int total)
......
......@@ -55,11 +55,11 @@ public:
QIcon icon;
QAction *action;
QAction *action = nullptr;
LogModeItemBuilder *itemBuilder;
LogModeItemBuilder *itemBuilder = nullptr;
LogModeConfigurationWidget *logModeConfigurationWidget;
LogModeConfigurationWidget *logModeConfigurationWidget = nullptr;
QSharedPointer<LogModeConfiguration> logModeConfiguration;
......
......@@ -249,7 +249,7 @@ void MainWindow::updateReloading()
{
View *currentView = mTabs->activeLogManager()->usedView();
bool enabled = !currentView->logViewWidget()->model()->isProcessingMultipleInsertions();
const bool enabled = !currentView->logViewWidget()->model()->isProcessingMultipleInsertions();
mReloadAction->setEnabled(enabled);
mResumePauseAction->setEnabled(enabled);
......
......@@ -43,10 +43,10 @@ StatusBar::StatusBar(QWidget *parent)
mLineCountLabel->setLineWidth(2);
mLineCountLabel->setMidLineWidth(2);
addPermanentWidget(mLineCountLabel, 1);
mMessageList = new KComboBox(this);
mMessageList = new QComboBox(this);
mMessageList->setInsertPolicy(QComboBox::InsertAtTop);
mMessageList->setMaxVisibleItems(5);
connect(mMessageList, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &StatusBar::selectLastHistory);
connect(mMessageList, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &StatusBar::selectLastHistory);
addPermanentWidget(mMessageList, 4);
mLastModificationLabel = new QLabel(this);
......
......@@ -26,7 +26,7 @@
class QString;
class QLabel;
class KComboBox;
class QComboBox;
class QPushButton;
namespace KSystemLog {
/**
......@@ -52,7 +52,7 @@ private Q_SLOTS:
private:
QLabel *mLineCountLabel = nullptr;
KComboBox *mMessageList = nullptr;
QComboBox *mMessageList = nullptr;
QLabel *mLastModificationLabel = nullptr;
QPushButton *mToggleHistory = nullptr;
};
......
......@@ -158,7 +158,7 @@ void TabLogViewsWidget::moveTabLeft()
logDebug() << "Duplicate tab to the left";
TabLogManager *currentTabLogManager = activeTabLogManager();
int position = indexOf(currentTabLogManager->logManager()->usedView());
const int position = indexOf(currentTabLogManager->logManager()->usedView());
if (position <= 0) {
logCritical() << "Tab Position <= 0 : " << position;
......
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