summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/kdebug.cpp4
-rw-r--r--tdecore/kurl.cpp28
-rw-r--r--tdecore/kurl.h10
-rw-r--r--tdecore/tdehardwaredevices.cpp2
4 files changed, 41 insertions, 3 deletions
diff --git a/tdecore/kdebug.cpp b/tdecore/kdebug.cpp
index 656edf6f9..d7b0372a6 100644
--- a/tdecore/kdebug.cpp
+++ b/tdecore/kdebug.cpp
@@ -298,7 +298,9 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
}
case 2: // Shell
{
- write( 2, buf, strlen( buf ) ); //fputs( buf, stderr );
+ if (write( 2, buf, strlen( buf ) ) < 0) { //fputs( buf, stderr );
+ // ERROR
+ }
break;
}
case 3: // syslog
diff --git a/tdecore/kurl.cpp b/tdecore/kurl.cpp
index 2079c050b..cb1ca9eea 100644
--- a/tdecore/kurl.cpp
+++ b/tdecore/kurl.cpp
@@ -400,6 +400,12 @@ static TQString cleanpath(const TQString &_path, bool cleanDirSeparator, bool de
return result;
}
+class KURLPrivate
+{
+public:
+ TQString m_strInternalReferenceURL;
+};
+
bool KURL::isRelativeURL(const TQString &_url)
{
int len = _url.length();
@@ -454,6 +460,7 @@ TQStringList KURL::List::toStringList() const
KURL::KURL()
{
+ d = new KURLPrivate();
reset();
}
@@ -464,25 +471,30 @@ KURL::~KURL()
KURL::KURL( const TQString &url, int encoding_hint )
{
+ d = new KURLPrivate();
reset();
parse( url, encoding_hint );
}
KURL::KURL( const char * url, int encoding_hint )
{
+ d = new KURLPrivate();
reset();
parse( TQString::fromLatin1(url), encoding_hint );
}
KURL::KURL( const TQCString& url, int encoding_hint )
{
+ d = new KURLPrivate();
reset();
parse( TQString::fromLatin1(url), encoding_hint );
}
KURL::KURL( const KURL& _u )
{
+ d = new KURLPrivate();
*this = _u;
+ d->m_strInternalReferenceURL = _u.d->m_strInternalReferenceURL;
}
TQDataStream & operator<< (TQDataStream & s, const KURL & a)
@@ -521,12 +533,16 @@ TQDataStream & operator>> (TQDataStream & s, KURL & a)
#ifndef QT_NO_NETWORKPROTOCOL
KURL::KURL( const TQUrl &u )
{
+ d = new KURLPrivate();
*this = u;
}
#endif
KURL::KURL( const KURL& _u, const TQString& _rel_url, int encoding_hint )
{
+ d = new KURLPrivate();
+ d->m_strInternalReferenceURL = _u.d->m_strInternalReferenceURL;
+
if (_u.hasSubURL()) // Operate on the last suburl, not the first
{
KURL::List lst = split( _u );
@@ -534,6 +550,7 @@ KURL::KURL( const KURL& _u, const TQString& _rel_url, int encoding_hint )
lst.remove( lst.last() );
lst.append( u );
*this = join( lst );
+ d->m_strInternalReferenceURL = _u.d->m_strInternalReferenceURL;
return;
}
// WORKAROUND THE RFC 1606 LOOPHOLE THAT ALLOWS
@@ -1077,6 +1094,7 @@ KURL& KURL::operator=( const KURL& _u )
m_bIsMalformed = _u.m_bIsMalformed;
m_iPort = _u.m_iPort;
m_iUriMode = _u.m_iUriMode;
+ d->m_strInternalReferenceURL = _u.d->m_strInternalReferenceURL;
return *this;
}
@@ -1137,7 +1155,8 @@ bool KURL::operator==( const KURL& _u ) const
m_strPath_encoded == _u.m_strPath_encoded ) &&
m_strQuery_encoded == _u.m_strQuery_encoded &&
m_strRef_encoded == _u.m_strRef_encoded &&
- m_iPort == _u.m_iPort )
+ m_iPort == _u.m_iPort &&
+ d->m_strInternalReferenceURL == _u.d->m_strInternalReferenceURL )
{
return true;
}
@@ -2295,6 +2314,13 @@ TQString KURL::relativePath(const TQString &base_dir, const TQString &path, bool
return result;
}
+void KURL::setInternalReferenceURL( const TQString& url ) {
+ d->m_strInternalReferenceURL = url;
+}
+
+TQString KURL::internalReferenceURL( void ) const {
+ return d->m_strInternalReferenceURL;
+}
TQString KURL::relativeURL(const KURL &base_url, const KURL &url, int encoding_hint)
{
diff --git a/tdecore/kurl.h b/tdecore/kurl.h
index ef454f60f..bcb44907e 100644
--- a/tdecore/kurl.h
+++ b/tdecore/kurl.h
@@ -591,6 +591,16 @@ public:
bool hasPath() const { return !m_strPath.isEmpty(); }
/**
+ * @brief @internal
+ */
+ void setInternalReferenceURL( const TQString& url );
+
+ /**
+ * @brief @internal
+ */
+ TQString internalReferenceURL( void ) const;
+
+ /**
* @brief Resolves @c "." and @c ".." components in path
*
* Some servers seem not to like the removal of extra @c '/'
diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp
index 3ed8661b6..1f185985e 100644
--- a/tdecore/tdehardwaredevices.cpp
+++ b/tdecore/tdehardwaredevices.cpp
@@ -868,7 +868,7 @@ TQString TDEStorageDevice::mountPath() {
TQStringList mountInfo = TQStringList::split(" ", line, true);
TQString testNode = *mountInfo.at(0);
// Check for match
- if ((testNode == deviceNode()) || (testNode == dmaltname)) {
+ if ((testNode == deviceNode()) || (testNode == dmaltname) || (testNode == ("/dev/disk/by-uuid/" + diskUUID()))) {
TQString ret = *mountInfo.at(1);
ret.replace("\\040", " ");
return ret;