summaryrefslogtreecommitdiffstats
path: root/src/object
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2018-12-13 03:46:07 +0000
committerThomas Holder <thomas@thomas-holder.de>2018-12-13 03:46:07 +0000
commit0b3a8cd8f233ae037ea9e5cee78b710e3e962830 (patch)
tree3d1a1ba03d3fa97d02cbc3392c8df092b30fa14e /src/object
parentFinish implementation of 'text-decoration-fill' and 'text-decoration-stroke'. (diff)
downloadinkscape-0b3a8cd8f233ae037ea9e5cee78b710e3e962830.tar.gz
inkscape-0b3a8cd8f233ae037ea9e5cee78b710e3e962830.zip
remove Inkscape::URI::fromUtf8
Diffstat (limited to 'src/object')
-rw-r--r--src/object/uri.cpp31
-rw-r--r--src/object/uri.h7
2 files changed, 0 insertions, 38 deletions
diff --git a/src/object/uri.cpp b/src/object/uri.cpp
index f6d044a6e..52fc9dc44 100644
--- a/src/object/uri.cpp
+++ b/src/object/uri.cpp
@@ -228,37 +228,6 @@ std::string URI::toNativeFilename() const
return Glib::filename_from_uri(uristr);
}
-URI URI::fromUtf8( gchar const* path ) {
- if ( !path ) {
- throw MalformedURIException();
- }
- Glib::ustring tmp;
- for ( int i = 0; path[i]; i++ )
- {
- gint one = 0x0ff & path[i];
- if ( ('a' <= one && one <= 'z')
- || ('A' <= one && one <= 'Z')
- || ('0' <= one && one <= '9')
- || one == '_'
- || one == '-'
- || one == '!'
- || one == '.'
- || one == '~'
- || one == '\''
- || one == '('
- || one == ')'
- || one == '*'
- ) {
- tmp += (gunichar)one;
- } else {
- gchar scratch[4];
- g_snprintf( scratch, 4, "%%%02X", one );
- tmp.append( scratch );
- }
- }
- return URI( tmp.data() );
-}
-
/* TODO !!! proper error handling */
URI URI::from_native_filename(gchar const *path) {
gchar *uri = g_filename_to_uri(path, nullptr, nullptr);
diff --git a/src/object/uri.h b/src/object/uri.h
index 04c4fabe6..d3cbae596 100644
--- a/src/object/uri.h
+++ b/src/object/uri.h
@@ -134,13 +134,6 @@ public:
const char *getOpaque() const { return _impl->getOpaque(); }
/**
- * @deprecated The regular constructor auto-detects UTF-8 characters and percent-encodes them.
- *
- * @todo remove, it's unused and percent-encodes most reserved characters, including "%", ":", "?", "#".
- */
- static URI fromUtf8( char const* path );
-
- /**
* Construct a "file" URI from an absolute filename.
*/
static URI from_native_filename(char const *path);