15 #include <QStringList>
25 : providerKey( layerItem->providerKey() ), name( layerItem->layerName() ), uri( layerItem->uri() )
48 bool inEscape =
false;
49 for (
int i = 0; i < encData.length(); ++i )
51 if ( encData.at( i ) == escape && !inEscape )
55 else if ( encData.at( i ) == split && !inEscape )
62 part += encData.at( i );
66 if ( !part.isEmpty() )
71 if ( parts.size() == 4 )
74 providerKey = parts[1];
77 QgsDebugMsg(
"type: " + layerType +
" key: " + providerKey +
" name: " + name +
" uri: " + uri );
83 QString escapedName = name;
84 QString escapeUri = uri;
85 escapedName.replace(
":",
"\\:" );
86 escapeUri.replace(
":",
"\\:" );
87 return layerType +
":" + providerKey +
":" + escapedName +
":" + escapeUri;
99 QMimeData *mimeData =
new QMimeData();
100 QByteArray encodedData;
102 QDataStream stream( &encodedData, QIODevice::WriteOnly );
116 QDataStream stream( &encodedData, QIODevice::ReadOnly );
119 while ( !stream.atEnd() )