Commit 2fc1314a authored by Michael Reeves's avatar Michael Reeves

Compile with -DQT_NO_URL_CAST_FROM_STRING

parent 21daa4c2
......@@ -64,7 +64,7 @@ set(
)
#make sure we get warnings about using deprecated functions in qt.
add_definitions(-DQT_DEPRECATED_WARNINGS)
add_definitions(-DQT_DEPRECATED_WARNINGS -DQT_NO_URL_CAST_FROM_STRING)
#remove unnneeded errors
remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_STRICT_ITERATORS -DQT_NO_KEYWORDS)
......
......@@ -804,7 +804,7 @@ bool FileAccess::removeFile()
else
{
FileAccessJobHandler jh( this );
return jh.removeFile( absoluteFilePath() );
return jh.removeFile( QUrl(absoluteFilePath()) );
}
}
......@@ -1137,7 +1137,7 @@ bool FileAccessJobHandler::rmDir( const QString& dirName )
}
}
bool FileAccessJobHandler::removeFile( const QString& fileName )
bool FileAccessJobHandler::removeFile( const QUrl& fileName )
{
if ( fileName.isEmpty() )
return false;
......@@ -1147,12 +1147,12 @@ bool FileAccessJobHandler::removeFile( const QString& fileName )
KIO::SimpleJob* pJob = KIO::file_delete( fileName, KIO::HideProgressInfo );
connect(pJob, &KIO::SimpleJob::result, this, &FileAccessJobHandler::slotSimpleJobResult);
ProgressProxy::enterEventLoop( pJob, i18n("Removing file: %1",fileName) );
ProgressProxy::enterEventLoop( pJob, i18n("Removing file: %1",fileName.toDisplayString()) );
return m_bSuccess;
}
}
bool FileAccessJobHandler::symLink( const QString& linkTarget, const QString& linkLocation )
bool FileAccessJobHandler::symLink( const QUrl& linkTarget, const QUrl& linkLocation )
{
if ( linkTarget.isEmpty() || linkLocation.isEmpty() )
return false;
......@@ -1163,7 +1163,7 @@ bool FileAccessJobHandler::symLink( const QString& linkTarget, const QString& li
connect(pJob, &KIO::CopyJob::result, this, &FileAccessJobHandler::slotSimpleJobResult);
ProgressProxy::enterEventLoop( pJob,
i18n("Creating symbolic link: %1 -> %2",linkLocation,linkTarget) );
i18n("Creating symbolic link: %1 -> %2",linkLocation.toDisplayString(),linkTarget.toDisplayString()) );
return m_bSuccess;
}
}
......
......@@ -146,8 +146,8 @@ public:
const QString& dirAntiPattern, bool bFollowDirLinks, bool bUseCvsIgnore );
bool mkDir( const QString& dirName );
bool rmDir( const QString& dirName );
bool removeFile( const QString& dirName );
bool symLink( const QString& linkTarget, const QString& linkLocation );
bool removeFile( const QUrl& dirName );
bool symLink( const QUrl& linkTarget, const QUrl& linkLocation );
private:
FileAccess* m_pFileAccess;
......
......@@ -755,7 +755,7 @@ void KDiff3App::slotFileSaveAs()
{
slotStatusMsg( i18n( "Saving file with a new filename..." ) );
QString s = QFileDialog::getSaveFileUrl( this, i18n( "Save As..." ), QDir::currentPath(), 0 ).url(QUrl::PreferLocalFile);
QString s = QFileDialog::getSaveFileUrl( this, i18n( "Save As..." ), QUrl::fromLocalFile(QDir::currentPath()), 0 ).url(QUrl::PreferLocalFile);
if( !s.isEmpty() ) {
m_outputFilename = s;
m_pMergeResultWindowTitle->setFileName( m_outputFilename );
......
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