|
|
|
@ -101,7 +101,7 @@ void AStylePart::loadGlobal()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// for (TQMap<TQString, TQVariant>::iterator iter = m_global.begin();iter != m_global.end();iter++)
|
|
|
|
|
// for (TQStringVariantMap::iterator iter = m_global.begin();iter != m_global.end();iter++)
|
|
|
|
|
// {
|
|
|
|
|
// kdDebug(9009) << "load: " <<iter.key() << "="<< iter.data() << endl;
|
|
|
|
|
// }
|
|
|
|
@ -110,7 +110,7 @@ void AStylePart::loadGlobal()
|
|
|
|
|
void AStylePart::saveGlobal()
|
|
|
|
|
{
|
|
|
|
|
TQString options;
|
|
|
|
|
for (TQMap<TQString, TQVariant>::iterator iter = m_global.begin();iter != m_global.end();iter++)
|
|
|
|
|
for (TQStringVariantMap::iterator iter = m_global.begin();iter != m_global.end();iter++)
|
|
|
|
|
{
|
|
|
|
|
// kdDebug(9009) <<"saveGlobal" <<iter.key() << "="<< iter.data() << endl;
|
|
|
|
|
options += iter.key();
|
|
|
|
@ -118,7 +118,7 @@ void AStylePart::saveGlobal()
|
|
|
|
|
options += iter.data().toString();
|
|
|
|
|
options += ",";
|
|
|
|
|
}
|
|
|
|
|
// for (TQMap<TQString, TQVariant>::iterator iter = m_project.begin();iter != m_project.end();iter++)
|
|
|
|
|
// for (TQStringVariantMap::iterator iter = m_project.begin();iter != m_project.end();iter++)
|
|
|
|
|
// {
|
|
|
|
|
// kdDebug(9009) << "project before: " <<iter.key() << "="<< iter.data() << endl;
|
|
|
|
|
// }
|
|
|
|
@ -129,11 +129,11 @@ void AStylePart::saveGlobal()
|
|
|
|
|
config->writeEntry("Extensions",m_globalExtensions.join(","));
|
|
|
|
|
|
|
|
|
|
config->sync();
|
|
|
|
|
// for (TQMap<TQString, TQVariant>::iterator iter = m_global.begin();iter != m_global.end();iter++)
|
|
|
|
|
// for (TQStringVariantMap::iterator iter = m_global.begin();iter != m_global.end();iter++)
|
|
|
|
|
// {
|
|
|
|
|
// kdDebug(9009) << "global after: " <<iter.key() << "="<< iter.data() << endl;
|
|
|
|
|
// }
|
|
|
|
|
// for (TQMap<TQString, TQVariant>::iterator iter = m_project.begin();iter != m_project.end();iter++)
|
|
|
|
|
// for (TQStringVariantMap::iterator iter = m_project.begin();iter != m_project.end();iter++)
|
|
|
|
|
// {
|
|
|
|
|
// kdDebug(9009) << "project after: " <<iter.key() << "="<< iter.data() << endl;
|
|
|
|
|
// }
|
|
|
|
@ -343,7 +343,7 @@ void AStylePart::activePartChanged ( KParts::Part *part )
|
|
|
|
|
formatTextAction->setEnabled ( enabled );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQString AStylePart::formatSource( const TQString text, AStyleWidget * widget, const TQMap<TQString, TQVariant>& options )
|
|
|
|
|
TQString AStylePart::formatSource( const TQString text, AStyleWidget * widget, const TQStringVariantMap& options )
|
|
|
|
|
{
|
|
|
|
|
ASStringIterator is(text);
|
|
|
|
|
KDevFormatter * formatter = ( widget)? new KDevFormatter( widget ) : new KDevFormatter(options);
|
|
|
|
@ -426,7 +426,7 @@ void AStylePart::restorePartialProjectSession(const TQDomElement * el)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
for (TQMap<TQString, TQVariant>::iterator iter = m_global.begin();iter != m_global.end();iter++)
|
|
|
|
|
for (TQStringVariantMap::iterator iter = m_global.begin();iter != m_global.end();iter++)
|
|
|
|
|
{
|
|
|
|
|
m_project[iter.key()] = style.attribute(iter.key(),iter.data().toString());
|
|
|
|
|
}
|
|
|
|
@ -451,7 +451,7 @@ void AStylePart::savePartialProjectSession(TQDomElement * el)
|
|
|
|
|
style.setAttribute("FStyle", m_project["FStyle"].toString());
|
|
|
|
|
if (m_project["FStyle"] != "GLOBAL")
|
|
|
|
|
{
|
|
|
|
|
for (TQMap<TQString, TQVariant>::iterator iter = m_project.begin();iter != m_project.end();iter++)
|
|
|
|
|
for (TQStringVariantMap::iterator iter = m_project.begin();iter != m_project.end();iter++)
|
|
|
|
|
{
|
|
|
|
|
style.setAttribute(iter.key(),iter.data().toString());
|
|
|
|
|
}
|
|
|
|
|