Skip to content
GitLab
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
71dfb8d2
Commit
71dfb8d2
authored
Jan 07, 2019
by
Laurent Montel
Browse files
remove some clazy warning
parent
20f4249c
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/historyAction.cpp
View file @
71dfb8d2
...
...
@@ -73,12 +73,12 @@ QUrl HistoryAction::pop()
HistoryCollection
::
HistoryCollection
(
KActionCollection
*
ac
,
QObject
*
parent
)
:
QObject
(
parent
)
,
m_b
(
new
HistoryAction
(
QIcon
::
fromTheme
(
Q
Latin1
String
(
"go-previous"
)),
i18nc
(
"Go to the last path viewed"
,
"Back"
),
ac
))
,
m_f
(
new
HistoryAction
(
QIcon
::
fromTheme
(
Q
Latin1
String
(
"go-next"
)),
i18nc
(
"Go to forward in the history of paths viewed"
,
"Forward"
),
ac
))
,
m_b
(
new
HistoryAction
(
QIcon
::
fromTheme
(
QString
Literal
(
"go-previous"
)),
i18nc
(
"Go to the last path viewed"
,
"Back"
),
ac
))
,
m_f
(
new
HistoryAction
(
QIcon
::
fromTheme
(
QString
Literal
(
"go-next"
)),
i18nc
(
"Go to forward in the history of paths viewed"
,
"Forward"
),
ac
))
,
m_receiver
(
nullptr
)
{
ac
->
addAction
(
Q
Latin1
String
(
"go_back"
),
m_b
);
ac
->
addAction
(
Q
Latin1
String
(
"go_forward"
),
m_f
);
ac
->
addAction
(
QString
Literal
(
"go_back"
),
m_b
);
ac
->
addAction
(
QString
Literal
(
"go_forward"
),
m_f
);
connect
(
m_b
,
&
QAction
::
triggered
,
this
,
&
HistoryCollection
::
pop
);
connect
(
m_f
,
&
QAction
::
triggered
,
this
,
&
HistoryCollection
::
pop
);
}
...
...
src/main.cpp
View file @
71dfb8d2
...
...
@@ -37,9 +37,9 @@ int main(int argc, char *argv[])
KLocalizedString
::
setApplicationDomain
(
"filelight"
);
Kdelibs4ConfigMigrator
migrate
(
Q
Latin1
String
(
"filelight"
));
migrate
.
setConfigFiles
(
QStringList
()
<<
Q
Latin1
String
(
"filelightrc"
));
migrate
.
setUiFiles
(
QStringList
()
<<
Q
Latin1
String
(
"filelightui.rc"
));
Kdelibs4ConfigMigrator
migrate
(
QString
Literal
(
"filelight"
));
migrate
.
setConfigFiles
(
QStringList
()
<<
QString
Literal
(
"filelightrc"
));
migrate
.
setUiFiles
(
QStringList
()
<<
QString
Literal
(
"filelightui.rc"
));
migrate
.
migrate
();
using
Filelight
::
MainWindow
;
...
...
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
KAboutData
::
setApplicationData
(
about
);
app
.
setOrganizationName
(
QStringLiteral
(
"KDE"
));
app
.
setWindowIcon
(
QIcon
::
fromTheme
(
Q
Latin1
String
(
APP_NAME
)));
app
.
setWindowIcon
(
QIcon
::
fromTheme
(
QString
Literal
(
APP_NAME
)));
QCommandLineParser
options
;
options
.
addHelpOption
();
...
...
src/mainWindow.cpp
View file @
71dfb8d2
...
...
@@ -350,7 +350,7 @@ void MainWindow::postInit()
//FIXME KXMLGUI is b0rked, it should allow us to set this
//BEFORE createGUI is called but it doesn't
stateChanged
(
Q
Latin1
String
(
"scan_failed"
));
stateChanged
(
QString
Literal
(
"scan_failed"
));
}
}
...
...
@@ -469,7 +469,7 @@ bool MainWindow::start(const QUrl &url)
setUrl
(
url
);
const
QString
s
=
i18n
(
"Scanning: %1"
,
prettyUrl
());
stateChanged
(
Q
Latin1
String
(
"scan_started"
));
stateChanged
(
QString
Literal
(
"scan_started"
));
emit
started
();
//as a MainWindow, we have to do this
emit
setWindowCaption
(
s
);
statusBar
()
->
showMessage
(
s
);
...
...
@@ -508,10 +508,10 @@ void MainWindow::folderScanCompleted(Folder *tree)
m_map
->
show
();
m_map
->
create
(
tree
);
stateChanged
(
Q
Latin1
String
(
"scan_complete"
));
stateChanged
(
QString
Literal
(
"scan_complete"
));
}
else
{
stateChanged
(
Q
Latin1
String
(
"scan_failed"
));
stateChanged
(
QString
Literal
(
"scan_failed"
));
emit
canceled
(
i18n
(
"Scan failed: %1"
,
prettyUrl
()));
emit
setWindowCaption
(
QString
());
...
...
src/progressBox.cpp
View file @
71dfb8d2
...
...
@@ -83,7 +83,7 @@ ProgressBox::halt()
{
// canceled by stop button
m_timer
.
stop
();
QTimer
::
singleShot
(
2000
,
this
,
SLOT
(
hide
())
);
QTimer
::
singleShot
(
2000
,
this
,
&
QWidget
::
hide
);
}
void
...
...
src/radialMap/labels.cpp
View file @
71dfb8d2
...
...
@@ -202,7 +202,7 @@ void RadialMap::Widget::paintExplodedLabels(QPainter &paint) const
font
.
setPointSize
(
sizes
[
label
->
level
]);
}
QFontMetrics
fontMetrics
(
font
);
const
int
minTextWidth
=
fontMetrics
.
width
(
QString
::
fromLatin1
(
"M..."
))
+
LABEL_TEXT_HMARGIN
;
// Fully elided string
const
int
minTextWidth
=
fontMetrics
.
width
(
QString
Literal
(
"M..."
))
+
LABEL_TEXT_HMARGIN
;
// Fully elided string
const
int
fontHeight
=
fontMetrics
.
height
()
+
LABEL_TEXT_VMARGIN
;
//used to ensure label texts don't overlap
const
int
lineSpacing
=
fontHeight
/
4
;
...
...
src/radialMap/widgetEvents.cpp
View file @
71dfb8d2
...
...
@@ -290,32 +290,32 @@ void RadialMap::Widget::mousePressEvent(QMouseEvent *e)
popup
.
setTitle
(
m_focus
->
file
()
->
displayPath
(
m_tree
));
if
(
isDir
)
{
openFileManager
=
popup
.
addAction
(
QIcon
::
fromTheme
(
Q
Latin1
String
(
"system-file-manager"
)),
i18n
(
"Open &File Manager Here"
));
openFileManager
=
popup
.
addAction
(
QIcon
::
fromTheme
(
QString
Literal
(
"system-file-manager"
)),
i18n
(
"Open &File Manager Here"
));
if
(
url
.
scheme
()
==
QLatin1String
(
"file"
))
{
openTerminal
=
popup
.
addAction
(
QIcon
::
fromTheme
(
Q
Latin1
String
(
"utilities-terminal"
)),
i18n
(
"Open &Terminal Here"
));
openTerminal
=
popup
.
addAction
(
QIcon
::
fromTheme
(
QString
Literal
(
"utilities-terminal"
)),
i18n
(
"Open &Terminal Here"
));
}
if
(
m_focus
->
file
()
!=
m_tree
)
{
popup
.
addSeparator
();
centerMap
=
popup
.
addAction
(
QIcon
::
fromTheme
(
Q
Latin1
String
(
"zoom-in"
)),
i18n
(
"&Center Map Here"
));
centerMap
=
popup
.
addAction
(
QIcon
::
fromTheme
(
QString
Literal
(
"zoom-in"
)),
i18n
(
"&Center Map Here"
));
}
}
else
{
openFile
=
popup
.
addAction
(
QIcon
::
fromTheme
(
Q
Latin1
String
(
"document-open"
)),
i18nc
(
"Scan/open the path of the selected element"
,
"&Open"
));
openFile
=
popup
.
addAction
(
QIcon
::
fromTheme
(
QString
Literal
(
"document-open"
)),
i18nc
(
"Scan/open the path of the selected element"
,
"&Open"
));
}
popup
.
addSeparator
();
copyClipboard
=
popup
.
addAction
(
QIcon
::
fromTheme
(
Q
Latin1
String
(
"edit-copy"
)),
i18n
(
"&Copy to clipboard"
));
copyClipboard
=
popup
.
addAction
(
QIcon
::
fromTheme
(
QString
Literal
(
"edit-copy"
)),
i18n
(
"&Copy to clipboard"
));
if
(
m_focus
->
file
()
!=
m_tree
)
{
popup
.
addSeparator
();
deleteItem
=
popup
.
addAction
(
QIcon
::
fromTheme
(
Q
Latin1
String
(
"edit-delete"
)),
i18n
(
"&Delete"
));
deleteItem
=
popup
.
addAction
(
QIcon
::
fromTheme
(
QString
Literal
(
"edit-delete"
)),
i18n
(
"&Delete"
));
}
QAction
*
clicked
=
popup
.
exec
(
e
->
globalPos
(),
nullptr
);
if
(
openFileManager
&&
clicked
==
openFileManager
)
{
KRun
::
runUrl
(
url
,
Q
Latin1
String
(
"inode/directory"
),
this
KRun
::
runUrl
(
url
,
QString
Literal
(
"inode/directory"
),
this
#if KIO_VERSION >= QT_VERSION_CHECK(5, 31, 0)
,
KRun
::
RunFlags
()
#endif
...
...
@@ -339,7 +339,7 @@ void RadialMap::Widget::mousePressEvent(QMouseEvent *e)
:
i18n
(
"<qt><i>'%1'</i> will be <b>permanently</b> deleted.</qt>"
,
url
.
toString
());
const
int
userIntention
=
KMessageBox
::
warningContinueCancel
(
this
,
message
,
QString
(),
KGuiItem
(
i18n
(
"&Delete"
),
Q
Latin1
String
(
"edit-delete"
)));
QString
(),
KGuiItem
(
i18n
(
"&Delete"
),
QString
Literal
(
"edit-delete"
)));
if
(
userIntention
==
KMessageBox
::
Continue
)
{
KIO
::
Job
*
job
=
KIO
::
del
(
url
);
...
...
src/scan.cpp
View file @
71dfb8d2
...
...
@@ -83,7 +83,7 @@ bool ScanManager::start(const QUrl &url)
Filelight
::
RemoteLister
*
remoteLister
=
new
Filelight
::
RemoteLister
(
url
,
(
QWidget
*
)
parent
(),
this
);
connect
(
remoteLister
,
&
Filelight
::
RemoteLister
::
branchCompleted
,
this
,
&
ScanManager
::
cacheTree
,
Qt
::
QueuedConnection
);
remoteLister
->
setParent
(
this
);
remoteLister
->
setObjectName
(
Q
Latin1
String
(
"remote_lister"
));
remoteLister
->
setObjectName
(
QString
Literal
(
"remote_lister"
));
remoteLister
->
openUrl
(
url
);
return
true
;
}
...
...
@@ -170,7 +170,7 @@ bool ScanManager::abort()
{
m_abort
=
true
;
delete
findChild
<
RemoteLister
*>
(
Q
Latin1
String
(
"remote_lister"
));
delete
findChild
<
RemoteLister
*>
(
QString
Literal
(
"remote_lister"
));
return
m_thread
&&
m_thread
->
wait
();
}
...
...
src/settingsDialog.cpp
View file @
71dfb8d2
...
...
@@ -82,8 +82,8 @@ SettingsDialog::SettingsDialog(QWidget *parent) : QDialog(parent)
connect
(
minFontPitch
,
static_cast
<
void
(
QSpinBox
::*
)(
int
)
>
(
&
QSpinBox
::
valueChanged
),
this
,
&
SettingsDialog
::
changeMinFontPitch
);
m_addButton
->
setIcon
(
QIcon
::
fromTheme
(
Q
Latin1
String
(
"folder-open"
)));
m_removeButton
->
setIcon
(
QIcon
::
fromTheme
(
Q
Latin1
String
(
"list-remove"
)));
m_addButton
->
setIcon
(
QIcon
::
fromTheme
(
QString
Literal
(
"folder-open"
)));
m_removeButton
->
setIcon
(
QIcon
::
fromTheme
(
QString
Literal
(
"list-remove"
)));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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