Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Filelight
Commits
cd6d66c5
Commit
cd6d66c5
authored
Aug 23, 2020
by
Martin Tobias Holmedahl Sandsmark
Browse files
fix updating status bar when starting scan
parent
4107a196
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/mainWindow.cpp
View file @
cd6d66c5
...
...
@@ -304,7 +304,7 @@ void MainWindow::scanCompleted()
action
(
"file_save"
)
->
setEnabled
(
true
);
m_combo
->
lineEdit
()
->
setText
(
prettyUrl
());
m_combo
->
lineEdit
()
->
setText
(
prettyUrl
(
url
));
if
(
url
.
toLocalFile
()
==
QLatin1String
(
"/"
))
{
action
(
"go_up"
)
->
setEnabled
(
false
);
...
...
@@ -424,8 +424,8 @@ bool MainWindow::closeUrl()
return
true
;
}
QString
MainWindow
::
prettyUrl
()
const
{
return
url
()
.
isLocalFile
()
?
QDir
::
toNativeSeparators
(
url
()
.
toLocalFile
())
:
url
()
.
toString
();
QString
MainWindow
::
prettyUrl
(
const
QUrl
&
url
)
const
{
return
url
.
isLocalFile
()
?
QDir
::
toNativeSeparators
(
url
.
toLocalFile
())
:
url
.
toString
();
}
void
MainWindow
::
updateURL
(
const
QUrl
&
u
)
...
...
@@ -491,7 +491,7 @@ bool MainWindow::start(const QUrl &url)
m_numberOfFiles
->
setText
(
QString
());
if
(
m_manager
->
start
(
url
))
{
const
QString
s
=
i18n
(
"Scanning: %1"
,
prettyUrl
());
const
QString
s
=
i18n
(
"Scanning: %1"
,
prettyUrl
(
url
));
stateChanged
(
QStringLiteral
(
"scan_started"
));
Q_EMIT
started
();
//as a MainWindow, we have to do this
Q_EMIT
setWindowCaption
(
s
);
...
...
@@ -534,7 +534,7 @@ void MainWindow::folderScanCompleted(Folder *tree)
}
else
{
stateChanged
(
QStringLiteral
(
"scan_failed"
));
Q_EMIT
canceled
(
i18n
(
"Scan failed: %1"
,
prettyUrl
()));
Q_EMIT
canceled
(
i18n
(
"Scan failed: %1"
,
prettyUrl
(
url
()
)));
Q_EMIT
setWindowCaption
(
QString
());
statusBar
()
->
clearMessage
();
...
...
@@ -552,7 +552,7 @@ void MainWindow::mapChanged(const Folder *tree)
{
//IMPORTANT -> url() has already been set
Q_EMIT
setWindowCaption
(
prettyUrl
());
Q_EMIT
setWindowCaption
(
prettyUrl
(
url
()
));
const
int
fileCount
=
tree
->
children
();
const
QString
text
=
(
fileCount
==
0
)
?
...
...
src/mainWindow.h
View file @
cd6d66c5
...
...
@@ -85,7 +85,7 @@ protected:
private:
void
setupActions
();
bool
closeUrl
();
QString
prettyUrl
()
const
;
QString
prettyUrl
(
const
QUrl
&
url
)
const
;
void
showSummary
();
bool
start
(
const
QUrl
&
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment