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() <= 5 )
74 providerKey = parts[1];
77 if ( parts[3] ==
"PG" )
79 uri = parts[3] +
":" + parts[4];
85 QgsDebugMsg(
"type: " + layerType +
" key: " + providerKey +
" name: " + name +
" uri: " + uri );
91 QString escapedName = name;
92 QString escapeUri = uri;
93 escapedName.replace(
":",
"\\:" );
94 escapeUri.replace(
":",
"\\:" );
95 return layerType +
":" + providerKey +
":" + escapedName +
":" + escapeUri;
107 QMimeData *mimeData =
new QMimeData();
108 QByteArray encodedData;
110 QDataStream stream( &encodedData, QIODevice::WriteOnly );
124 QDataStream stream( &encodedData, QIODevice::ReadOnly );
127 while ( !stream.atEnd() )