Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Remove unneeded custom KUIViewerPart::openURL

Does nothing special over the default implementation
parent 3ccfe94b
......@@ -16,11 +16,9 @@ find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE
find_package(KF5 REQUIRED
COMPONENTS
CoreAddons
JobWidgets
KIO
I18n
Parts
WidgetsAddons
)
########### next target ###############
......
......@@ -32,9 +32,6 @@
#include <KLocalizedString>
#include <KAboutData>
#include <KPluginFactory>
#include <KIO/Job>
#include <kjobwidgets.h>
#include <KMessageBox>
// Qt
#include <QApplication>
#include <QClipboard>
......@@ -43,7 +40,6 @@
#include <QFormBuilder>
#include <QStyle>
#include <QStyleFactory>
#include <QTemporaryFile>
#include <QVBoxLayout>
......@@ -144,31 +140,6 @@ bool KUIViewerPart::openFile()
return true;
}
bool KUIViewerPart::openURL( const QUrl &url)
{
// just for fun, set the status bar
emit setStatusBarText( url.toDisplayString() );
emit setWindowCaption( url.toDisplayString() );
setUrl(url);
setLocalFilePath( QString() );
QTemporaryFile tmpFile;
const QUrl tmpFileUrl = QUrl::fromLocalFile(tmpFile.fileName());
if (tmpFile.open()) {
KIO::FileCopyJob *job = KIO::file_copy(this->url(), tmpFileUrl);
KJobWidgets::setWindow(job, QApplication::activeWindow());
if (job->exec()) {
setLocalFilePath( tmpFile.fileName() );
return openFile();
}
} else {
KMessageBox::sorry(nullptr, tmpFile.errorString());
}
return false;
}
void KUIViewerPart::updateActions()
{
if ( !m_view.isNull() ) {
......
......@@ -56,7 +56,6 @@ public:
virtual ~KUIViewerPart();
public slots:
bool openURL( const QUrl& );
void slotStyle(int);
void slotGrab();
void updateActions();
......
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