Commit ab569431 authored by David Faure's avatar David Faure

KIO::file_copy takes two files, not (file,dir). + -DQT_NO_URL_CAST_FROM_STRING

parent 3444713f
......@@ -61,6 +61,8 @@ if(OPENGL_SUPPORT)
add_definitions(-DOPENGL_SUPPORT)
endif(OPENGL_SUPPORT)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_subdirectory(src)
add_subdirectory(doc)
......
......@@ -931,12 +931,11 @@ ksudoku::KsView* KSudoku::currentView() const{
void KSudoku::loadCustomShapeFromPath()
{
KUrl Url = KFileDialog::getOpenUrl( KUrl(), QString(), this, i18n("Open Location") );
QUrl Url = KFileDialog::getOpenUrl( QUrl(), QString(), this, i18n("Open Location") );
if ( Url.isEmpty() || !Url.isValid() )
{
//TODO ERROR
return;
return; // user cancelled
}
QString tmpFile;
......@@ -961,7 +960,7 @@ void KSudoku::loadCustomShapeFromPath()
else
{
//just copy
KIO::file_copy (Url, destDir);
KIO::file_copy (Url, QUrl::fromLocalFile(destDir + '/' + Url.fileName()));
}
KIO::NetAccess::removeTempFile(tmpFile);
......
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