[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kcontrol/componentchooser
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2003-08-22 3:53:34
[Download RAW message or body]

CVS commit by aseigo: 

fix BR61453, where it crashes when trying set a component for which no
KTrader offers were found.

my solution is to just simply not write anything to the file, since when
and if that happens there is no sane value to write there, and if there
IS a sane value already there i'd rather not see it overwritten.

won't backport until comments on this approach are recvd though =)


  M +5 -1      componentchooser.cpp   1.21


--- kdebase/kcontrol/componentchooser/componentchooser.cpp  #1.20:1.21
@@ -59,4 +59,8 @@ void CfgComponent::slotComponentChanged(
 
 void CfgComponent::save(KConfig *cfg) {
+                // yes, this can happen if there are NO KTrader offers for this component
+                if (!m_lookupDict[ComponentSelector->currentText()])
+                        return;
+
                 QString ServiceTypeToConfigure=cfg->readEntry("ServiceTypeToConfigure");
                 KConfig *store = new KConfig(cfg->readPathEntry("storeInFile","null"));


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic