[Kst] branches/work/kst/kst1kde4/kst/src/libkstapp
Zongyi Zhang
freebody.kst at gmail.com
Thu Apr 15 23:14:23 CEST 2010
SVN commit 1115296 by zhang:
url
M +3 -3 kstmatrixdialog.cpp
M +4 -3 kstpluginmanager.cpp
M +3 -3 kstvectordialog.cpp
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstmatrixdialog.cpp #1115295:1115296
@@ -138,7 +138,7 @@
QDir dir(strFolder);
if (dir.cdUp()) {
- fileDlg->setURL(KUrl(dir.absPath()));
+ fileDlg->setDirectory(dir);
}
}
}
@@ -1006,10 +1006,10 @@
if (QFile::exists(u) && QFileInfo(u).isRelative()) {
url.setPath(u);
} else {
- url = KUrl::fromPathOrURL(u);
+ url = QUrl(u);
}
- if (!_inTest && !url.isLocalFile() && url.protocol() != "file" && !url.protocol().isEmpty()) {
+ if (!_inTest && !url.scheme()=="file" && url.scheme() != "file" && !url.isRelative()) {
_w->_connect->show();
} else if (url.isValid()) {
list = KstDataSource::matrixListForSource(u, QString::null, &type, &complete);
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstpluginmanager.cpp #1115295:1115296
@@ -23,6 +23,7 @@
#include <QMessageBox>
#include <QRadioButton>
#include <QRegExp>
+#include <QFileDialog>
#include "kstpluginmanager.h"
#include "plugincollection.h"
@@ -57,15 +58,15 @@
void KstPluginManager::install() {
-/* xxx
- KUrl xmlfile = KFileDialog::getOpenURL(QString::null, "*.xml", this, QObject::tr("Select Plugin to Install"));
+ QUrl xmlfile = QFileDialog::getOpenFileName(this, QObject::tr("Select Plugin to Install"), QString::null, tr("XML files (*.xml)"));
+
if (xmlfile.isEmpty()) {
return;
}
QString tmpFile;
-
+/* xxx
if (!KIO::NetAccess::download(xmlfile, tmpFile, this)) {
QMessageBox::critical(this, QObject::tr("Kst"),QObject::tr("Unable to access file %1.").arg(xmlfile.prettyURL()), QObject::tr("KST Plugin Loader"));
return;
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstvectordialog.cpp #1115295:1115296
@@ -219,15 +219,15 @@
bool complete = false;
/* xxx
QString u = _w->FileName->url();
- KURL url;
+ QUrl url;
if (QFile::exists(u) && QFileInfo(u).isRelative()) {
url.setPath(u);
} else {
- url = KURL::fromPathOrURL(u);
+ url = QUrl(u);
}
- if (!_inTest && !url.isLocalFile() && url.protocol() != "file" && !url.protocol().isEmpty()) {
+ if (!_inTest && !url.scheme()=="file" && url.scheme() != "file" && !url.isRelative()) {
_w->_connect->show();
} else if (url.isValid()) {
list = KstDataSource::fieldListForSource(u, QString::null, &type, &complete);
More information about the Kst
mailing list