• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • kdecore
  • io
Macros | Functions | Variables
kurl.cpp File Reference
#include "kurl.h"
#include <kdebug.h>
#include <kglobal.h>
#include <kshell.h>
#include <stdio.h>
#include <assert.h>
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
#include <QtCore/QDir>
#include <QtCore/QMutableStringListIterator>
#include <QtCore/QRegExp>
#include <QtCore/QMimeData>
#include <QtCore/QTextCodec>

Go to the source code of this file.

Macros

#define IS_DRIVE_OR_DOUBLESLASH(isletter, char1, char2, colon, slash)    ((isletter && char2 == colon) || (char1 == slash && char2 == slash))
 
#define IS_DRIVE_OR_DOUBLESLASH_0    ( IS_DRIVE_OR_DOUBLESLASH(IS_LETTER(QLatin1Char(str[0])), QLatin1Char(str[0]), QLatin1Char(str[1]), QLatin1Char(':'), QLatin1Char('/')) )
 
#define IS_LETTER(c)    ((c >= QLatin1Char('A') && c <= QLatin1Char('Z')) || (c >= QLatin1Char('a') && c <= QLatin1Char('z')))
 
#define IS_SLASH_AND_DRIVE_OR_DOUBLESLASH_0    ( QLatin1Char(str[0]) == QLatin1Char('/') && IS_DRIVE_OR_DOUBLESLASH(IS_LETTER(QLatin1Char(str[1])), QLatin1Char(str[1]), QLatin1Char(str[2]), QLatin1Char(':'), QLatin1Char('/')) )
 

Functions

static QString _relativePath (const QString &base_dir, const QString &path, bool &isParent)
 
static QString cleanpath (const QString &_path, bool cleanDirSeparator, bool decodeDots)
 
static bool hasSubUrl (const QUrl &url)
 
static bool isLocalFile (const QUrl &url)
 
uint qHash (const KUrl &kurl)
 
static QString removeSlashOrFilePrefix (const QString &str)
 
static QString toPrettyPercentEncoding (const QString &input, bool forFragment)
 
static QString trailingSlash (KUrl::AdjustPathOption trailing, const QString &path)
 
static QByteArray uriListData (const KUrl::List &urls)
 
bool urlcmp (const QString &_url1, const QString &_url2)
 
bool urlcmp (const QString &_url1, const QString &_url2, const KUrl::EqualsOptions &_options)
 

Variables

static const char s_kdeUriListMime [] = "application/x-kde4-urilist"
 

Macro Definition Documentation

◆ IS_DRIVE_OR_DOUBLESLASH

#define IS_DRIVE_OR_DOUBLESLASH (   isletter,
  char1,
  char2,
  colon,
  slash 
)     ((isletter && char2 == colon) || (char1 == slash && char2 == slash))

Definition at line 126 of file kurl.cpp.

◆ IS_DRIVE_OR_DOUBLESLASH_0

#define IS_DRIVE_OR_DOUBLESLASH_0    ( IS_DRIVE_OR_DOUBLESLASH(IS_LETTER(QLatin1Char(str[0])), QLatin1Char(str[0]), QLatin1Char(str[1]), QLatin1Char(':'), QLatin1Char('/')) )

◆ IS_LETTER

#define IS_LETTER (   c)     ((c >= QLatin1Char('A') && c <= QLatin1Char('Z')) || (c >= QLatin1Char('a') && c <= QLatin1Char('z')))

◆ IS_SLASH_AND_DRIVE_OR_DOUBLESLASH_0

#define IS_SLASH_AND_DRIVE_OR_DOUBLESLASH_0    ( QLatin1Char(str[0]) == QLatin1Char('/') && IS_DRIVE_OR_DOUBLESLASH(IS_LETTER(QLatin1Char(str[1])), QLatin1Char(str[1]), QLatin1Char(str[2]), QLatin1Char(':'), QLatin1Char('/')) )

Function Documentation

◆ _relativePath()

static QString _relativePath ( const QString &  base_dir,
const QString &  path,
bool &  isParent 
)
static

Definition at line 1688 of file kurl.cpp.

◆ cleanpath()

static QString cleanpath ( const QString &  _path,
bool  cleanDirSeparator,
bool  decodeDots 
)
static

KDE4 TODO: maybe we should use QUrl::resolved()

Definition at line 50 of file kurl.cpp.

◆ hasSubUrl()

static bool hasSubUrl ( const QUrl &  url)
inlinestatic

Definition at line 983 of file kurl.cpp.

◆ isLocalFile()

static bool isLocalFile ( const QUrl &  url)
inlinestatic

Definition at line 905 of file kurl.cpp.

◆ qHash()

uint qHash ( const KUrl &  kurl)

Definition at line 1914 of file kurl.cpp.

◆ removeSlashOrFilePrefix()

static QString removeSlashOrFilePrefix ( const QString &  str)
static

Definition at line 132 of file kurl.cpp.

◆ toPrettyPercentEncoding()

static QString toPrettyPercentEncoding ( const QString &  input,
bool  forFragment 
)
static

Definition at line 1063 of file kurl.cpp.

◆ trailingSlash()

static QString trailingSlash ( KUrl::AdjustPathOption  trailing,
const QString &  path 
)
static

Definition at line 769 of file kurl.cpp.

◆ uriListData()

static QByteArray uriListData ( const KUrl::List &  urls)
static

Definition at line 226 of file kurl.cpp.

◆ urlcmp() [1/2]

bool urlcmp ( const QString &  _url1,
const QString &  _url2 
)
related

Definition at line 1605 of file kurl.cpp.

◆ urlcmp() [2/2]

bool urlcmp ( const QString &  _url1,
const QString &  _url2,
const KUrl::EqualsOptions &  _options 
)
related

Definition at line 1629 of file kurl.cpp.

Variable Documentation

◆ s_kdeUriListMime

const char s_kdeUriListMime[] = "application/x-kde4-urilist"
static

Definition at line 246 of file kurl.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal