fixed crash on "install" after gui start

This commit is contained in:
Vadim Kurland
2008-08-31 01:31:12 +00:00
parent fa4290ef3e
commit de75910f84
4 changed files with 27 additions and 20 deletions
+4
View File
@@ -1,5 +1,9 @@
2008-08-30 Vadim Kurland <vadim@vk.crocodile.org>
* FWWindow.cpp (FWWindow::FWWindow): fixed GUI crash that happened
when user clicked toolbar button "Install" right after gui start
before any data file was opened.
* instDialog.cpp (instDialog::fillCompileSelectList): disabled
font manipulations in install/compile dialog, it did not work
right on windows
+6 -2
View File
@@ -203,6 +203,8 @@ FWWindow::FWWindow() : QMainWindow(), // QMainWindow(NULL, Qt::Desktop),
qDebug("/FWWindow constructor");
recreateWindowsMenu();
disableActions(false);
// findObject->setMinimumSize( QSize( 0, 0 ) );
}
@@ -1551,7 +1553,8 @@ void FWWindow::recreateWindowsMenu ()
for (int i = 0 ; i < subWindowList.size();i++)
{
windowsPainters.push_back (subWindowList[i]);
ProjectPanel * pp = dynamic_cast <ProjectPanel *>(subWindowList[i]->widget());
ProjectPanel * pp = dynamic_cast<ProjectPanel *>(
subWindowList[i]->widget());
if (pp!=NULL)
{
if (pp->isClosing())
@@ -1565,7 +1568,8 @@ void FWWindow::recreateWindowsMenu ()
act->setCheckable ( true );
if (subWindowList[i]==m_space->activeSubWindow ())
act->setChecked(true);
connect(act, SIGNAL(triggered()), this, SLOT(selectActiveSubWindow()));
connect(act, SIGNAL(triggered()),
this, SLOT(selectActiveSubWindow()));
}
}
+12 -15
View File
@@ -458,7 +458,8 @@ void ProjectPanel::openRuleSet(FWObject * obj)
void ProjectPanel::selectRules()
{
// `unselect();
RuleSetView* rv=dynamic_cast<RuleSetView*>(m_panel->ruleSets->currentWidget());
RuleSetView* rv = dynamic_cast<RuleSetView*>(
m_panel->ruleSets->currentWidget());
rv->setFocus();
}
@@ -1135,7 +1136,8 @@ void ProjectPanel::rollBackSelectionDifferentWidget()
QString ProjectPanel::printHeader()
{
QString headerText = rcs->getFileName().section("/",-1,-1);
if (rcs->isInRCS()) headerText = headerText + ", rev " + rcs->getSelectedRev();
if (rcs->isInRCS())
headerText = headerText + ", rev " + rcs->getSelectedRev();
return headerText;
}
@@ -1146,16 +1148,14 @@ void ProjectPanel::releaseEditor()
void ProjectPanel::connectEditor(QWidget *w)
{
connect(this,
SIGNAL(restoreSelection_sign(bool)),
w,
SLOT(restoreSelection(bool)));
connect(this, SIGNAL(restoreSelection_sign(bool)),
w, SLOT(restoreSelection(bool)));
}
bool ProjectPanel::requestEditorOwnership(QWidget *w,
FWObject *obj,
ObjectEditor::OptType otype,
bool validate)
FWObject *obj,
ObjectEditor::OptType otype,
bool validate)
{
if (!isEditorVisible()) return false;
@@ -1177,9 +1177,9 @@ bool ProjectPanel::requestEditorOwnership(QWidget *w,
* is still connected to the previous owner
*/
if (w == editorOwner )
QTimer::singleShot( 0, this, SLOT(rollBackSelectionSameWidget()) );
QTimer::singleShot(0, this, SLOT(rollBackSelectionSameWidget()));
else
QTimer::singleShot( 0, this, SLOT(rollBackSelectionDifferentWidget()) );
QTimer::singleShot(0,this,SLOT(rollBackSelectionDifferentWidget()));
return false;
}
@@ -1209,8 +1209,7 @@ bool ProjectPanel::isStandardId(FWObject *obj)
return objectTreeFormat->isStandardId(obj);
}
bool ProjectPanel::validateForInsertion(FWObject *target,
FWObject *obj)
bool ProjectPanel::validateForInsertion(FWObject *target, FWObject *obj)
{
return objectTreeFormat->validateForInsertion(target, obj);
}
@@ -1240,8 +1239,6 @@ FWObject* ProjectPanel::createNewLibrary(FWObjectDatabase *db)
return objectTreeFormat->createNewLibrary(db);
}
void ProjectPanel::scheduleRuleSetRedraw()
{
if (!ruleSetRedrawPending)
+5 -3
View File
@@ -1030,9 +1030,7 @@ void ProjectPanel::load(QWidget*)
/*
* Load user data file referenced by the RCS object
*/
void ProjectPanel::load(QWidget*,
RCS* _rcs,
FWObjectDatabase* clone)
void ProjectPanel::load(QWidget*, RCS* _rcs, FWObjectDatabase* clone)
{
QStatusBar *sb = mainW->statusBar();
@@ -1176,6 +1174,7 @@ void ProjectPanel::load(QWidget*,
0, 1 );
load(this);
mainW->disableActions(m_panel->ruleSets->count()!=0);
return;
}
nfinfo.setFile(nfn);
@@ -1209,6 +1208,7 @@ void ProjectPanel::load(QWidget*,
mainW->addToRCSActionSetEn( !rcs->isInRCS() && !rcs->isRO());
mainW->fileDiscardActionSetEn( rcs->isInRCS() && !rcs->isRO());
mainW->fileCommitActionSetEn( rcs->isInRCS() && !rcs->isRO());
mainW->disableActions(m_panel->ruleSets->count()!=0);
} catch(FWException &ex)
{
@@ -1252,6 +1252,7 @@ void ProjectPanel::load(QWidget*,
0, 1 );
}
load(this);
mainW->disableActions(m_panel->ruleSets->count()!=0);
return;
}
@@ -1515,6 +1516,7 @@ void ProjectPanel::load(QWidget*, RCS *_rcs)
mainW->addToRCSActionSetEn( !rcs->isInRCS() && !rcs->isRO());
mainW->fileDiscardActionSetEn( rcs->isInRCS() && !rcs->isRO());
mainW->fileCommitActionSetEn( rcs->isInRCS() && !rcs->isRO());
mainW->disableActions(m_panel->ruleSets->count()!=0);
} catch(FWException &ex)
{