works again
This commit is contained in:
@@ -34,12 +34,34 @@ XQMainWindow::XQMainWindow( QWidget* parent )
|
||||
}
|
||||
|
||||
|
||||
// setzt das working directory: dieses muss das 'xml' datenverzeichnis enthalten.
|
||||
|
||||
void XQMainWindow::setupWorkingDir()
|
||||
{
|
||||
QDir dir = QDir::current();
|
||||
|
||||
while (dir.exists())
|
||||
{
|
||||
QString xmlPath = dir.absoluteFilePath("xml");
|
||||
if (QDir(xmlPath).exists())
|
||||
{
|
||||
qDebug() << " --- CD TO: " << dir.absolutePath();
|
||||
QDir::setCurrent( dir.absolutePath() );
|
||||
}
|
||||
if (!dir.cdUp())
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//! actions & document struktur einrichten.
|
||||
|
||||
void XQMainWindow::initMainWindow()
|
||||
{
|
||||
|
||||
qDebug() << " --- initMainWindow(): here we go!";
|
||||
// das working dir setzen: 'xml' muss als unterverzeichnis vorhanden sein.
|
||||
setupWorkingDir();
|
||||
|
||||
// als allererstes laden wir die Modelschreibungen
|
||||
XQItemFactory::instance().initItemFactory( c_ModelSheetFileName );
|
||||
@@ -295,11 +317,12 @@ void XQMainWindow::loadDocument( const QString& fileName )
|
||||
// read the model data
|
||||
childModel->setContent( contentRoot->first_child() );
|
||||
|
||||
/*
|
||||
// create new entry in the left side main tree view
|
||||
|
||||
XQItem* newEntry = _mainModelView.createTreeEntry( contentRoot );
|
||||
_mainTreeView->setCurrentIndex( newEntry->index() );
|
||||
_documentStore.addDocument( fileName, pTitle, newEntry, childModel );
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user