Commit f5fd875d authored by Michael Reeves's avatar Michael Reeves

Don't try to manually build url if parent is not set.

parent ae2cc209
......@@ -20,5 +20,6 @@
#include "Logging.h"
Q_LOGGING_CATEGORY(kdiffMain, "org.kde.kdiff3")
Q_LOGGING_CATEGORY(kdiffFileAccess, "org.kde.kdiff3.fileAccess")
//The following is very noisey if debug is turned on and not really useful unless your making changes in the core data processing.
Q_LOGGING_CATEGORY(kdiffCore, "org.kde.kdiff3.core", QtWarningMsg)
......@@ -22,6 +22,8 @@
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(kdiffCore) //very noisey shows internal state information for kdiffs core.
#endif // !LOGGING_H
......@@ -10,6 +10,7 @@
#include "fileaccess.h"
#include "cvsignorelist.h"
#include "common.h"
#include "Logging.h"
#include "progress.h"
#include "ProgressProxyExtender.h"
#include "Utils.h"
......@@ -282,11 +283,24 @@ void FileAccess::setFromUdsEntry(const KIO::UDSEntry& e, FileAccess *parent)
m_fileInfo = QFileInfo(filePath);
if(parent != nullptr)
m_url = parent->url().resolved(QUrl(filePath));
//Verify that the scheme doesn't change.
Q_ASSERT(m_url.scheme() == parent->url().scheme());
Invalid entry we don't know the full url because KIO didn't tell us and there is no parent
node supplied.
This is a bug if it happens and should be logged . However it is a recoverable error.
qCWarning(kdiffFileAccess) << i18n("Unable to determine full url. No parent specified.");
m_name = m_fileInfo.fileName();
if(isLocal() && m_name.isEmpty())
......@@ -156,7 +156,7 @@ void KDiff3App::mainInit(TotalDiffStatus* pTotalDiffStatus, bool bLoadFiles, boo
// First get all input data.
pp.setInformation(i18n("Loading A"));
qCInfo(kdiffMain) << i18n("Loading A: %1 ", m_sd1.getFilename());
qCInfo(kdiffMain) << i18n("Loading A: %1", m_sd1.getFilename());
errors = m_sd1.readAndPreprocess(m_sd1.getEncoding(), false);
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