Commit 990e3280 authored by Harald Sitter's avatar Harald Sitter 💎

move some part impls to the cpp to make refactoring easier

parent f59ccd0b
......@@ -206,6 +206,10 @@ Part::closeUrl()
return ReadOnlyPart::closeUrl();
}
QString Part::prettyUrl() const {
return url().isLocalFile() ? url().toLocalFile() : url().toString();
}
void
Part::updateURL(const QUrl &u)
{
......@@ -339,6 +343,10 @@ Part::showSummary()
else m_summary->show();
}
bool Filelight::Part::openFile() {
return false; //pure virtual in base class
}
} //namespace Filelight
#include "part.moc"
......@@ -57,14 +57,10 @@ class Part : public KParts::ReadOnlyPart
public:
Part(QWidget *, QObject *, const QList<QVariant>&);
virtual bool openFile() {
return false; //pure virtual in base class
}
virtual bool openFile();
virtual bool closeUrl();
QString prettyUrl() const {
return url().isLocalFile() ? url().toLocalFile() : url().toString();
}
QString prettyUrl() const;
public slots:
virtual bool openUrl(const QUrl&);
......@@ -99,6 +95,7 @@ private:
private slots:
void updateURL(const QUrl &);
};
}
#endif
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