[PATCH] kopenwith.cpp bugfix and enhancement

David Faure dfaure at klaralvdalens-datakonsult.se
Tue Feb 11 14:00:39 GMT 2003

Hash: SHA1

On Tuesday 11 February 2003 14:45, Willy De la Court wrote:
> This only sets the Terminal var to true if you select the remeber checkbox in 
> effect if you don't want to remeber the settings it does not run the app in a 
> terminal but just in the background. So i moved the if(terminal->isChecked) 
> from under the condition if(remeber->ischecked()) to make it independant of 
> the fact you want to remeber the setting or not.
> Do you agree with my reasoning?

Oh. Now I see. You broke it :(

The old code modified m_command to contain the command for running a terminal,
in case the remember checkbox didn't exist or wasn't checked. In such a case
there is _NO_ creation of a .desktop file, so the writeEntry() code is totally irrelevant.
But by modifying the command, and setting m_pService to 0, we ensure that the 
caller will run the full command, including the terminal.

- -    KSimpleConfig conf(QString::fromLatin1("konquerorrc"), true);
- -    conf.setGroup(QString::fromLatin1("Misc Defaults"));
- -    m_command = conf.readEntry(QString::fromLatin1("Terminal"), QString::fromLatin1("konsole"));
- -
- -    m_command += QString::fromLatin1(" -e ");
- -    m_command += edit->url();

> Damn and i tought i did a good job of leaving all the functionality intact.
> So at what should a look in the future to avoid these pitfalls?


> I look forward on the applied patch to see what i could have done better.

Please provide a patch that basically reverts to the above code,
and adds the new option to m_command when the new checkbox is checked.

> PS: Do you also maintain KRun?
Yes, alas :)

- -- 
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Klarälvdalens Datakonsult AB, Platform-independent software solutions
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KOffice-1.2.1 is available - http://download.kde.org/stable/koffice-1.2.1/
Version: GnuPG v1.0.7 (GNU/Linux)


More information about the kde-core-devel mailing list