Your ROOT_URL in app.ini is http://git.osmesh.ru/ but you are visiting http://91.221.70.94:3000/MOS/OpenBoard/commit/71e8585b742a67ab2d1a8e24d9700b721e219583?style=unified&whitespace=ignore-eol
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
14 additions and
4 deletions
src/adaptors/UBImportDocument.cpp
src/core/UBPersistenceManager.cpp
src/core/UBPersistenceManager.h
@ -191,7 +191,7 @@ UBDocumentProxy* UBImportDocument::importFile(const QFile& pFile, const QString&
return 0 ;
}
else {
UBDocumentProxy * newDocument = UBPersistenceManager : : persistenceManager ( ) - > createDocumentFromDir ( documentRootFolder ) ;
UBDocumentProxy * newDocument = UBPersistenceManager : : persistenceManager ( ) - > createDocumentFromDir ( documentRootFolder , pGroup ) ;
UBApplication : : showMessage ( tr ( " Import successful. " ) ) ;
return newDocument ;
}
@ -254,13 +254,23 @@ UBDocumentProxy* UBPersistenceManager::createDocument(const QString& pGroupName,
return doc ;
}
UBDocumentProxy * UBPersistenceManager : : createDocumentFromDir ( const QString & pDocumentDirectory )
UBDocumentProxy * UBPersistenceManager : : createDocumentFromDir ( const QString & pDocumentDirectory , const QString & pGroupName , const QString & pName , bool withEmptyPage )
{
checkIfDocumentRepositoryExists ( ) ;
UBDocumentProxy * doc = new UBDocumentProxy ( pDocumentDirectory ) ; // deleted in UBPersistenceManager::destructor
if ( pGroupName . length ( ) > 0 )
{
doc - > setMetaData ( UBSettings : : documentGroupName , pGroupName ) ;
}
if ( pName . length ( ) > 0 )
{
doc - > setMetaData ( UBSettings : : documentName , pName ) ;
}
if ( withEmptyPage ) createDocumentSceneAt ( doc , 0 ) ;
QMap < QString , QVariant > metadatas = UBMetadataDcSubsetAdaptor : : load ( pDocumentDirectory ) ;
foreach ( QString key , metadatas . keys ( ) )
@ -46,7 +46,7 @@ class UBPersistenceManager : public QObject
static void destroy ( ) ;
virtual UBDocumentProxy * createDocument ( const QString & pGroupName = " " , const QString & pName = " " , bool withEmptyPage = true ) ;
virtual UBDocumentProxy * createDocumentFromDir ( const QString & pDocumentDirectory ) ;
virtual UBDocumentProxy * createDocumentFromDir ( const QString & pDocumentDirectory , const QString & pGroupName = " " , const QString & pName = " " , bool withEmptyPage = false ) ;
virtual UBDocumentProxy * persistDocumentMetadata ( UBDocumentProxy * pDocumentProxy ) ;