Commit 7c7a3110 authored by Alexander Semke's avatar Alexander Semke
Browse files

Fixed a couple of issues reported by cppcheck.

parent d300c2fc
...@@ -339,8 +339,6 @@ CantorPart::CantorPart( QWidget *parentWidget, QObject *parent, const QVariantLi ...@@ -339,8 +339,6 @@ CantorPart::CantorPart( QWidget *parentWidget, QObject *parent, const QVariantLi
connect(removeCurrent, &QAction::triggered, m_worksheet, &Worksheet::removeCurrentEntry); connect(removeCurrent, &QAction::triggered, m_worksheet, &Worksheet::removeCurrentEntry);
m_editActions.push_back(removeCurrent); m_editActions.push_back(removeCurrent);
Cantor::Backend* const backend = Cantor::Backend::getBackend(backendName);
// Disabled, because uploading to kde store from program don't work // Disabled, because uploading to kde store from program don't work
// See https://phabricator.kde.org/T9980 for details // See https://phabricator.kde.org/T9980 for details
// If this situation will changed, then uncomment this action // If this situation will changed, then uncomment this action
...@@ -750,6 +748,7 @@ void CantorPart::showBackendHelp() ...@@ -750,6 +748,7 @@ void CantorPart::showBackendHelp()
auto* job = new KIO::OpenUrlJob(backend->helpUrl()); auto* job = new KIO::OpenUrlJob(backend->helpUrl());
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, widget())); job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, widget()));
job->start(); job->start();
delete job;
} }
Worksheet* CantorPart::worksheet() Worksheet* CantorPart::worksheet()
......
...@@ -38,7 +38,7 @@ class LatexEntry : public WorksheetEntry ...@@ -38,7 +38,7 @@ class LatexEntry : public WorksheetEntry
QJsonValue toJupyterJson() override; QJsonValue toJupyterJson() override;
QString toPlain(const QString& commandSep, const QString& commentStartingSeq, const QString& commentEndingSeq) override; QString toPlain(const QString& commandSep, const QString& commentStartingSeq, const QString& commentEndingSeq) override;
void layOutForWidth(qreal w, qreal entry_zone_x, bool force = false) override; void layOutForWidth(qreal entry_zone_x, qreal w, bool force = false) override;
int searchText(const QString& text, const QString& pattern, int searchText(const QString& text, const QString& pattern,
QTextDocument::FindFlags qt_flags); QTextDocument::FindFlags qt_flags);
......
...@@ -1654,7 +1654,7 @@ bool Worksheet::loadJupyterNotebook(const QJsonDocument& doc) ...@@ -1654,7 +1654,7 @@ bool Worksheet::loadJupyterNotebook(const QJsonDocument& doc)
qDebug() << "loading jupyter entries"; qDebug() << "loading jupyter entries";
WorksheetEntry* entry = nullptr; WorksheetEntry* entry = nullptr;
for (QJsonArray::const_iterator iter = cells.begin(); iter != cells.end(); iter++) { for (QJsonArray::const_iterator iter = cells.begin(); iter != cells.end(); ++iter) {
if (!Cantor::JupyterUtils::isJupyterCell(*iter)) if (!Cantor::JupyterUtils::isJupyterCell(*iter))
{ {
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
......
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