else if ( data.contains( "=" ) && !section.isEmpty() )
{
int pos = data.find( separator );
- QString key = data.left( pos - 1 ).stripWhiteSpace();
+ QString key = data.left( pos ).stripWhiteSpace();
QString val = data.mid( pos + 1 ).stripWhiteSpace();
secMap[section].insert( key, val );
}
parent = desktop();
return QFileDialog::getExistingDirectory( initial, parent, 0, caption, true );
}
+
+void STD_Application::setDesktop( SUIT_Desktop* desk )
+{
+ SUIT_Desktop* prev = desktop();
+
+ SUIT_Application::setDesktop( desk );
+
+ if ( prev != desk && desk )
+ connect( desk, SIGNAL( closing( SUIT_Desktop*, QCloseEvent* ) ),
+ this, SLOT( onDesktopClosing( SUIT_Desktop*, QCloseEvent* ) ) );
+}
virtual void updateDesktopTitle();
virtual void updateCommandsStatus();
+ virtual void setDesktop( SUIT_Desktop* );
+
virtual void beforeCloseDoc( SUIT_Study* theDoc );
virtual void afterCloseDoc();
SUIT_Application* startApplication( int, char** ) const;
SUIT_Application* startApplication( const QString&, int, char** ) const;
- void setDesktop( SUIT_Desktop* );
+ virtual void setDesktop( SUIT_Desktop* );
//! Creates a new Study instance. Must be redefined in new application according to its Study type.
virtual SUIT_Study* createNewStudy();