Commit d7624e78 authored by Antonio Rojas's avatar Antonio Rojas
Browse files

Port knetattach away from kdelibs4support

parent 5c13d69f
......@@ -9,7 +9,7 @@ add_executable(knetattach ${knetattach_SRCS})
target_compile_definitions(knetattach PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}")
target_link_libraries(knetattach KF5::KIOWidgets KF5::KDELibs4Support)
target_link_libraries(knetattach KF5::KIOWidgets KF5::I18n KF5::Codecs)
install(TARGETS knetattach DESTINATION ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -22,19 +22,15 @@
#include <QVariant>
#include <KIO/NetAccess>
#include <KIO/StatJob>
#include <KJobWidgets>
#include <KMessageBox>
#include <QIcon>
#include <KLocale>
#include <KGlobalSettings>
#include <KConfig>
#include <KConfigGroup>
#include <KStandardDirs>
#include <KDirNotify>
#include <KCharsets>
#include <KDebug>
#include <KRun>
#include <KGlobal>
#include <QDesktopServices>
#include <QTextCodec>
......@@ -228,9 +224,7 @@ bool KNetAttach::validateCurrentPage()
QString name = _connectionName->text().trimmed();
if (_createIcon->isChecked()) {
KGlobal::dirs()->addResourceType("remote_entries", "data", "remoteview");
QString path = KGlobal::dirs()->saveLocation("remote_entries");
QString path = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/remoteview/");
path += name + QStringLiteral(".desktop");
KConfig _desktopFile( path, KConfig::SimpleConfig );
KConfigGroup desktopFile(&_desktopFile, "Desktop Entry");
......@@ -289,12 +283,9 @@ void KNetAttach::updatePort(bool encryption)
bool KNetAttach::doConnectionTest(const QUrl& url)
{
KIO::UDSEntry entry;
if (KIO::NetAccess::stat(url, entry, this)) {
// Anything to test here?
return true;
}
return false;
KIO::StatJob *job = KIO::stat(url);
KJobWidgets::setWindow(job, this);
return job->exec();
}
......
......@@ -48,7 +48,7 @@
</spacer>
</item>
<item>
<widget class="KButtonGroup" name="buttonGroup1">
<widget class="QGroupBox" name="buttonGroup1">
<property name="title">
<string/>
</property>
......@@ -382,12 +382,6 @@
</widget>
</widget>
<customwidgets>
<customwidget>
<class>KButtonGroup</class>
<extends>QGroupBox</extends>
<header>kbuttongroup.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
......
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