Commit cbd5411f authored by Michael Reeves's avatar Michael Reeves

Remove QUrlFix

parent 0ed7dd2b
......@@ -19,13 +19,12 @@ set(kdiff3part_PART_SRCS
gnudiff_xmalloc.cpp
common.cpp
smalldialogs.cpp
progress.cpp
QUrlFix.cpp )
progress.cpp )
add_library(kdiff3part MODULE ${kdiff3part_PART_SRCS})
set_target_properties(kdiff3part PROPERTIES DEFINE_SYMBOL KDIFF3_PART)
target_compile_features(kdiff3part PRIVATE ${needed_features})
target_link_libraries(kdiff3part ${KDiff3_LIBRARIES} KF5::Parts)
install(TARGETS kdiff3part DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/parts )
......@@ -42,6 +41,7 @@ set(kdiff3_SRCS
add_executable(kdiff3 ${kdiff3_SRCS})
target_link_libraries(kdiff3 KF5::ConfigCore KF5::ConfigGui KF5::Parts ${KDiff3_LIBRARIES} )
target_compile_features(kdiff3 PRIVATE ${needed_features})
install(TARGETS kdiff3 ${INSTALL_TARGETS_DEFAULT_ARGS})
......
#include <QUrl>
#include "QUrlFix.h"
QUrlFix::QUrlFix(const QString &url):QUrl(url, TolerantMode)
{
if(this->scheme().isEmpty()) this->setScheme("file");//so QUrl:isLocalFile: works as expected on QT5.
}
#ifndef QT_NO_URL_CAST_FROM_STRING
QUrlFix& QUrlFix::operator =(const QString &url){
setUrl(url);
return *this;
}
#endif
void QUrlFix::setUrl(const QString &url){
QUrl::setUrl(url);
if(this->scheme().isEmpty()) this->setScheme("file");//so QUrl:isLocalFile: works as expected on QT5.
}
#ifndef QURLFIX_H
#define QURLFIX_H
#include <QUrl>
class QUrlFix:public QUrl{
public:
QUrlFix():QUrl(){};//make compiler shutup
QUrlFix(const QUrl &copy):QUrl(copy){};//make compiler shutup
QUrlFix(const QString &url);
void setUrl(const QString &url);
QUrlFix& operator =(const QString &url);
};
#endif
\ No newline at end of file
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