Commit 42247456 authored by Alexander Lohnau's avatar Alexander Lohnau 💬

Fix warnings about unused variables

parent 8b56d885
......@@ -51,7 +51,6 @@ private:
char m_algo[2], m_parms[2];
long long m_realsize;
int m_adate, m_cdate;
long long m_curpos;
};
#endif
......@@ -125,18 +125,17 @@ public:
class DULinesItem : public QTreeWidgetItem
{
public:
DULinesItem(DiskUsage *diskUsageIn, File *fileItem, QTreeWidget * parent, const QString& label1,
DULinesItem(File *fileItem, QTreeWidget * parent, const QString& label1,
const QString& label2, const QString& label3) : QTreeWidgetItem(parent),
diskUsage(diskUsageIn), file(fileItem) {
file(fileItem) {
setText(0, label1);
setText(1, label2);
setText(2, label3);
setTextAlignment(1, Qt::AlignRight);
}
DULinesItem(DiskUsage *diskUsageIn, File *fileItem, QTreeWidget * parent, QTreeWidgetItem * after,
const QString& label1, const QString& label2, const QString& label3) : QTreeWidgetItem(parent, after),
diskUsage(diskUsageIn), file(fileItem) {
DULinesItem(File *fileItem, QTreeWidget * parent, QTreeWidgetItem * after,
const QString& label1, const QString& label2, const QString& label3) : QTreeWidgetItem(parent, after), file(fileItem) {
setText(0, label1);
setText(1, label2);
setText(2, label3);
......@@ -168,7 +167,6 @@ public:
}
private:
DiskUsage *diskUsage;
File *file;
};
......@@ -284,9 +282,9 @@ void DULines::slotDirChanged(Directory *dirEntry)
QString fileName = item->name();
if (lastItem == nullptr)
lastItem = new DULinesItem(diskUsage, item, this, "", item->percent() + " ", fileName);
lastItem = new DULinesItem(item, this, "", item->percent() + " ", fileName);
else
lastItem = new DULinesItem(diskUsage, item, this, lastItem, "", item->percent() + " ", fileName);
lastItem = new DULinesItem(item, this, lastItem, "", item->percent() + " ", fileName);
if (item->isExcluded())
lastItem->setHidden(true);
......
......@@ -144,7 +144,6 @@ void MediaButton::createMediaList()
for (auto & it : possibleMountList) {
if (krMtMan.networkFilesystem(it->mountType())) {
QString path = it->mountPoint();
bool mounted = false;
for (auto & it2 : currentMountList) {
......@@ -175,7 +174,6 @@ bool MediaButton::getNameAndIcon(Solid::Device & device, QString &name, QIcon &i
if (access == nullptr)
return false;
QString udi = device.udi();
QString label = i18nc("Unknown label", "Unknown");
bool mounted = access->isAccessible();
QString path = access->filePath();
......
......@@ -227,7 +227,6 @@ void KrViewer::createGUI(KParts::Part* part)
}
// and "fix" the menubar
QList<QAction *> actList = menuBar()->actions();
viewerMenu->setTitle(i18n("&KrViewer"));
QAction * act = menuBar() ->addMenu(viewerMenu);
act->setData(QVariant(70));
......
......@@ -54,7 +54,7 @@
class KrDirModel : public KDirModel
{
public:
KrDirModel(QWidget *parent, KrFileTreeView *ftv) : KDirModel(parent), fileTreeView(ftv) {}
KrDirModel(QWidget *parent) : KDirModel(parent) {}
protected:
Qt::ItemFlags flags(const QModelIndex &index) const override
......@@ -64,9 +64,6 @@ protected:
itflags &= ~Qt::ItemIsDropEnabled;
return itflags;
}
private:
KrFileTreeView *fileTreeView;
};
class TreeStyle : public QProxyStyle
......@@ -88,7 +85,7 @@ public:
KrFileTreeView::KrFileTreeView(QWidget *parent)
: QTreeView(parent), mStartTreeFromCurrent(false), mStartTreeFromPlace(true)
{
mSourceModel = new KrDirModel(this, this);
mSourceModel = new KrDirModel(this);
mSourceModel->dirLister()->setDirOnlyMode(true);
mProxyModel = new KDirSortFilterProxyModel(this);
......
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