works again

This commit is contained in:
Christoph Holzheuer
2025-08-14 19:13:53 +02:00
parent d3f2cbeaec
commit a6fb7e82bd
15 changed files with 92 additions and 161 deletions

View File

@@ -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 );
*/
}