summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-23 15:49:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-23 15:49:40 +0100
commitc73f88de8bc6f892ff1215c5f634ff0bfca04553 (patch)
treefdbd79e6ac532a6334540f82a5ff30770bf06363 /vcl/unx
parent407546e7c3f8c732ccf60e5fb3844f6efb86f932 (diff)
Various loplugin in --enable-gtk3-kde5 code
Change-Id: I006e7fddcb58edb597867e0dd6f2b81ddac3457e
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk3_kde5/kde5_filepicker.cxx44
-rw-r--r--vcl/unx/gtk3_kde5/kde5_filepicker.hxx30
-rw-r--r--vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx7
-rw-r--r--vcl/unx/gtk3_kde5/kde5_filepicker_ipc.hxx2
-rw-r--r--vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx4
5 files changed, 39 insertions, 48 deletions
diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
index 456ba645808b..9b3f21db92e9 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
@@ -72,9 +72,9 @@ KDE5FilePicker::~KDE5FilePicker()
delete _dialog;
}
-void SAL_CALL KDE5FilePicker::setTitle(const QString& title) { _dialog->setWindowTitle(title); }
+void KDE5FilePicker::setTitle(const QString& title) { _dialog->setWindowTitle(title); }
-bool SAL_CALL KDE5FilePicker::execute()
+bool KDE5FilePicker::execute()
{
if (!_filters.isEmpty())
_dialog->setNameFilters(_filters);
@@ -86,29 +86,20 @@ bool SAL_CALL KDE5FilePicker::execute()
return _dialog->exec() == QFileDialog::Accepted;
}
-void SAL_CALL KDE5FilePicker::setMultiSelectionMode(bool multiSelect)
+void KDE5FilePicker::setMultiSelectionMode(bool multiSelect)
{
_dialog->setFileMode(multiSelect ? QFileDialog::ExistingFiles : QFileDialog::ExistingFile);
}
-void SAL_CALL KDE5FilePicker::setDefaultName(const QString& name)
-{
- _dialog->selectUrl(QUrl(name));
-}
+void KDE5FilePicker::setDefaultName(const QString& name) { _dialog->selectUrl(QUrl(name)); }
-void SAL_CALL KDE5FilePicker::setDisplayDirectory(const QString& dir)
-{
- _dialog->selectUrl(QUrl(dir));
-}
+void KDE5FilePicker::setDisplayDirectory(const QString& dir) { _dialog->selectUrl(QUrl(dir)); }
-QString SAL_CALL KDE5FilePicker::getDisplayDirectory() const
-{
- return _dialog->directoryUrl().url();
-}
+QString KDE5FilePicker::getDisplayDirectory() const { return _dialog->directoryUrl().url(); }
-QList<QUrl> SAL_CALL KDE5FilePicker::getSelectedFiles() const { return _dialog->selectedUrls(); }
+QList<QUrl> KDE5FilePicker::getSelectedFiles() const { return _dialog->selectedUrls(); }
-void SAL_CALL KDE5FilePicker::appendFilter(const QString& title, const QString& filter)
+void KDE5FilePicker::appendFilter(const QString& title, const QString& filter)
{
QString t = title;
QString f = filter;
@@ -126,12 +117,12 @@ void SAL_CALL KDE5FilePicker::appendFilter(const QString& title, const QString&
_titleToFilters[t] = _filters.constLast();
}
-void SAL_CALL KDE5FilePicker::setCurrentFilter(const QString& title)
+void KDE5FilePicker::setCurrentFilter(const QString& title)
{
_currentFilter = _titleToFilters.value(title);
}
-QString SAL_CALL KDE5FilePicker::getCurrentFilter() const
+QString KDE5FilePicker::getCurrentFilter() const
{
QString filter = _titleToFilters.key(_dialog->selectedNameFilter());
@@ -142,8 +133,7 @@ QString SAL_CALL KDE5FilePicker::getCurrentFilter() const
return filter;
}
-void SAL_CALL KDE5FilePicker::setValue(sal_Int16 controlId, sal_Int16 /*nControlAction*/,
- bool value)
+void KDE5FilePicker::setValue(sal_Int16 controlId, sal_Int16 /*nControlAction*/, bool value)
{
if (_customWidgets.contains(controlId))
{
@@ -155,7 +145,7 @@ void SAL_CALL KDE5FilePicker::setValue(sal_Int16 controlId, sal_Int16 /*nControl
qWarning() << "set value on unknown control" << controlId;
}
-bool SAL_CALL KDE5FilePicker::getValue(sal_Int16 controlId, sal_Int16 /*nControlAction*/) const
+bool KDE5FilePicker::getValue(sal_Int16 controlId, sal_Int16 /*nControlAction*/) const
{
bool ret = false;
if (_customWidgets.contains(controlId))
@@ -170,7 +160,7 @@ bool SAL_CALL KDE5FilePicker::getValue(sal_Int16 controlId, sal_Int16 /*nControl
return ret;
}
-void SAL_CALL KDE5FilePicker::enableControl(sal_Int16 controlId, sal_Bool enable)
+void KDE5FilePicker::enableControl(sal_Int16 controlId, bool enable)
{
if (_customWidgets.contains(controlId))
_customWidgets.value(controlId)->setEnabled(enable);
@@ -178,7 +168,7 @@ void SAL_CALL KDE5FilePicker::enableControl(sal_Int16 controlId, sal_Bool enable
qWarning() << "enable on unknown control" << controlId;
}
-void SAL_CALL KDE5FilePicker::setLabel(sal_Int16 controlId, const QString& label)
+void KDE5FilePicker::setLabel(sal_Int16 controlId, const QString& label)
{
if (_customWidgets.contains(controlId))
{
@@ -190,7 +180,7 @@ void SAL_CALL KDE5FilePicker::setLabel(sal_Int16 controlId, const QString& label
qWarning() << "set label on unknown control" << controlId;
}
-QString SAL_CALL KDE5FilePicker::getLabel(sal_Int16 controlId) const
+QString KDE5FilePicker::getLabel(sal_Int16 controlId) const
{
QString label;
if (_customWidgets.contains(controlId))
@@ -218,7 +208,7 @@ void KDE5FilePicker::addCheckBox(sal_Int16 controlId, const QString& label, bool
_customWidgets.insert(controlId, widget);
}
-void SAL_CALL KDE5FilePicker::initialize(bool saveDialog)
+void KDE5FilePicker::initialize(bool saveDialog)
{
//default is opening
QFileDialog::AcceptMode operationMode
@@ -251,6 +241,6 @@ bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
return QObject::eventFilter(o, e);
}
-#include "kde5_filepicker.moc"
+#include <kde5_filepicker.moc>
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
index 25c7454f86b5..17a37b7e27a3 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
@@ -59,31 +59,31 @@ protected:
public:
explicit KDE5FilePicker(QObject* parent = nullptr);
- ~KDE5FilePicker();
+ ~KDE5FilePicker() override;
void enableFolderMode();
// XExecutableDialog functions
- void SAL_CALL setTitle(const QString& rTitle);
- bool SAL_CALL execute();
+ void setTitle(const QString& rTitle);
+ bool execute();
// XFilePicker functions
- void SAL_CALL setMultiSelectionMode(bool bMode);
- void SAL_CALL setDefaultName(const QString& rName);
- void SAL_CALL setDisplayDirectory(const QString& rDirectory);
- QString SAL_CALL getDisplayDirectory() const;
+ void setMultiSelectionMode(bool bMode);
+ void setDefaultName(const QString& rName);
+ void setDisplayDirectory(const QString& rDirectory);
+ QString getDisplayDirectory() const;
// XFilterManager functions
- void SAL_CALL appendFilter(const QString& rTitle, const QString& rFilter);
- void SAL_CALL setCurrentFilter(const QString& rTitle);
- QString SAL_CALL getCurrentFilter() const;
+ void appendFilter(const QString& rTitle, const QString& rFilter);
+ void setCurrentFilter(const QString& rTitle);
+ QString getCurrentFilter() const;
// XFilePickerControlAccess functions
- void SAL_CALL setValue(sal_Int16 nControlId, sal_Int16 nControlAction, bool rValue);
- bool SAL_CALL getValue(sal_Int16 nControlId, sal_Int16 nControlAction) const;
- void SAL_CALL enableControl(sal_Int16 nControlId, sal_Bool bEnable);
- void SAL_CALL setLabel(sal_Int16 nControlId, const QString& rLabel);
- QString SAL_CALL getLabel(sal_Int16 nControlId) const;
+ void setValue(sal_Int16 nControlId, sal_Int16 nControlAction, bool rValue);
+ bool getValue(sal_Int16 nControlId, sal_Int16 nControlAction) const;
+ void enableControl(sal_Int16 nControlId, bool bEnable);
+ void setLabel(sal_Int16 nControlId, const QString& rLabel);
+ QString getLabel(sal_Int16 nControlId) const;
// XFilePicker2 functions
QList<QUrl> getSelectedFiles() const;
diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
index 1ae6289677d6..082864066d16 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
@@ -127,8 +127,9 @@ void FilePickerIpc::readCommand()
case Commands::GetSelectedFiles:
{
QStringList files;
- for (auto url : m_filePicker->getSelectedFiles())
+ for (auto const& url_ : m_filePicker->getSelectedFiles())
{
+ auto url = url_;
if (url.scheme() == QLatin1String("webdav")
|| url.scheme() == QLatin1String("webdavs"))
{
@@ -228,13 +229,13 @@ void FilePickerIpc::readCommand()
}
case Commands::Quit:
{
- qApp->quit();
+ QCoreApplication::quit();
return;
}
}
qWarning() << "unhandled command " << static_cast<uint16_t>(command);
}
-#include "kde5_filepicker_ipc.moc"
+#include <kde5_filepicker_ipc.moc>
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.hxx b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.hxx
index 8a282675b5e2..d04ad24e2908 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.hxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.hxx
@@ -30,7 +30,7 @@ class FilePickerIpc : public QObject
Q_OBJECT
public:
explicit FilePickerIpc(KDE5FilePicker* filePicker, QObject* parent = nullptr);
- ~FilePickerIpc();
+ ~FilePickerIpc() override;
private Q_SLOTS:
void readCommands();
diff --git a/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx b/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx
index 43d92aba614a..c17236d281a0 100644
--- a/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx
@@ -28,12 +28,12 @@ int main(int argc, char** argv)
{
QApplication::setApplicationName(QStringLiteral("lo_kde5filepicker"));
QApplication app(argc, argv);
- app.setQuitOnLastWindowClosed(false);
+ QApplication::setQuitOnLastWindowClosed(false);
KDE5FilePicker filePicker;
FilePickerIpc ipc(&filePicker);
- return app.exec();
+ return QApplication::exec();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */