relative_path_fix.patch

Chris Crook, 2010-12-01 06:03 PM

Download (1.2 KB)

View differences:

src/core/qgsproject.cpp (working copy)
1367 1367

  
1368 1368
  QString srcPath = src;
1369 1369
  QString projPath = fileName();
1370
  QString queryString = "";
1371
  if( srcPath.contains("?"))
1372
  {
1373
	  int pos = srcPath.indexOf("?");
1374
	  queryString = srcPath.mid(pos);
1375
	  srcPath = srcPath.left(pos);
1376
  }
1370 1377

  
1371 1378
#if defined(Q_OS_WIN)
1372 1379
  srcPath.replace( "\\", "/" );
......
1407 1414
  projElems.prepend( "" );
1408 1415
#endif
1409 1416

  
1410
  return projElems.join( "/" );
1417
  return projElems.join( "/" ).append(queryString);
1411 1418
}
1412 1419

  
1413 1420
// return the absolute or relative path to write it to the project file
......
1419 1426
  }
1420 1427

  
1421 1428
  QString srcPath = src;
1429
  QString queryString = "";
1430
  if( srcPath.contains("?"))
1431
  {
1432
	  int pos = srcPath.indexOf("?");
1433
	  queryString = srcPath.mid(pos);
1434
	  srcPath = srcPath.left(pos);
1435
  }
1422 1436
  QString projPath = fileName();
1423 1437

  
1424 1438
#if defined( Q_OS_WIN )
......
1483 1497
    srcElems.insert( 0, "." );
1484 1498
  }
1485 1499

  
1486
  return srcElems.join( "/" );
1500
  return srcElems.join( "/" ).append(queryString);
1487 1501
}
1488 1502

  
1489 1503
void QgsProject::setError( QString errorMessage )