Skip to content

Commit 4867cba

Browse files
committed
removal of cppcheck-detected errors
1 parent b0a920c commit 4867cba

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

resources/app/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<ul class="dropdown-menu" role="menu" aria-labelledby="requests">
4949
<li><a href="http://local-pseudodomain/filesystem.html" target="iframe_a">Open Files or Folders</a></li>
5050
<li><a href="http://local-pseudodomain/nonexistent.html" target="iframe_a">Nonexistent File</a></li>
51-
<li><a href="http://local-pseudodomain/dummy.txt" target="iframe_a">Unsupported File</a></li>
51+
<li><a href="http://local-pseudodomain/dummy.txt">Unsupported File</a></li>
5252
<li><a href="http://local-pseudodomain/perl/noextpl" target="iframe_a">Extensionless Script</a></li>
5353
</ul>
5454
</li>
@@ -86,8 +86,8 @@
8686
Print<span class="caret"></span>
8787
</a>
8888
<ul class="dropdown-menu" role="menu" aria-labelledby="requests">
89-
<li><a href="http://local-pseudodomain/print.function?action=preview" target="iframe_a">Print Preview</a></li>
90-
<li><a href="http://local-pseudodomain/print.function?action=print" target="iframe_a">Print</a></li>
89+
<li><a href="http://local-pseudodomain/print.function?action=preview">Print Preview</a></li>
90+
<li><a href="http://local-pseudodomain/print.function?action=print">Print</a></li>
9191
</ul>
9292
</li>
9393

src/peb.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ int main(int argc, char **argv)
167167
int pid = fork();
168168
if (pid < 0) {
169169
return 1;
170-
QApplication::exit();
171170
}
172171

173172
if (pid == 0) {
@@ -185,12 +184,10 @@ int main(int argc, char **argv)
185184
QApplication::applicationFilePath());
186185
if (anotherInstance.waitForStarted(-1)) {
187186
return 1;
188-
QApplication::exit();
189187
}
190188
} else {
191189
// The parent instance should be closed now:
192190
return 1;
193-
QApplication::exit();
194191
}
195192
}
196193
#endif
@@ -342,7 +339,6 @@ int main(int argc, char **argv)
342339
// MAIN GUI CLASSES INITIALIZATION:
343340
// ==============================
344341
QMainBrowserWindow mainWindow;
345-
mainWindow.webViewWidget = new QWebViewWidget();
346342

347343
// Application property necessary when
348344
// closing the main window is requested using
@@ -516,7 +512,7 @@ QFileReader::QFileReader(QString filePath)
516512
QMainBrowserWindow::QMainBrowserWindow(QWidget *parent)
517513
: QMainWindow(parent)
518514
{
519-
// !!! No need to implement code here, but must be declared !!!
515+
webViewWidget = new QWebViewWidget();
520516
}
521517

522518
// ==============================

src/peb.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class QFileReader : public QObject
6464
Q_OBJECT
6565

6666
public:
67-
QFileReader(QString filePath);
67+
explicit QFileReader(QString filePath);
6868
QString fileContents;
6969
};
7070

@@ -1071,7 +1071,7 @@ public slots:
10711071

10721072
// qDebug() << QDateTime::currentMSecsSinceEpoch()
10731073
// << "msecs from epoch:"
1074-
// qDebug() << "Perl debugger raw output:" << endl
1074+
// << "Perl debugger raw output:" << endl
10751075
// << debuggerOutput;
10761076

10771077
// Formatting of Perl debugger output is started only after
@@ -1085,7 +1085,6 @@ public slots:
10851085

10861086
QByteArray debuggerOutputArray;
10871087
debuggerOutputArray.append(debuggerAccumulatedOutput.toLatin1());
1088-
debuggerOutputArray.append(QString("\n").toLatin1());
10891088

10901089
// Clean any previous debugger output:
10911090
debuggerAccumulatedOutput = "";

0 commit comments

Comments
 (0)