
This is our main file, and it is a big one. Over 6K lines of code. While Laurent is working on the dialogs and the rest of the ui, I decided to go for it and try to clean it up.
First, I changed a lot of Q3ValueList to QLinkedList, since we always seem to use lists with iterator, and it was either changing all the iterator declarations or changing the Q3ValueList to QLinkedList. In the end, I would have to do it anyway, so it was cheaper. I only had to do one minor in mymoneyfile to return accountList as a QLinkedList, and we were good to go. I know that "minor" change is going to bite me later, because that method is used everywhere, but what the hell, we will have to it anyway eventually.
After that, I went for a bunch of i18n errors. I had to go through the KDE porting guide for those. What is a context call? First time I had seen that. Anyway, I managed to fix all of those.
After that, I found a few QLinkedList-related problems, with methods which have been removed and stuff like that. Minor errors, and they are gone now.
I had to change the inheritance from KMainWindow to KXmlGuiWindow. That's because it uses the guiFactory() methods to set the screen and this has been moved to this new class.
And then into KActions. I had to go through a lot of old API docs to understand how they were being instantiated in the old code, and onto the new API docs to understand how they should be instantiated now.
So, this is what the old statement looked like:
new KAction(i18n("Rename currency"), "edit", 0, this, SIGNAL(currencyRename()), actionCollection(), "currency_rename");
And this is the new one:
KAction *currency_rename = actionCollection()->addAction("currency_rename");
currency_rename->setText(i18n("Rename currency"));
currency_rename->setIcon(KIcon("delete"));
connect(currency_rename, SIGNAL(triggered()), this, SIGNAL(currencyRename()));
I really like the old one better!!! Though I understand it is better to be integrated with QAction. But, couldn't we keep the old constructors????
Now I am going through about 50 KAction statements, converting the old statements to the new ones.
Recent comments
6 weeks 1 day ago
10 weeks 3 days ago
13 weeks 8 hours ago
15 weeks 3 days ago
15 weeks 3 days ago
15 weeks 3 days ago
15 weeks 3 days ago
15 weeks 3 days ago
21 weeks 6 days ago
25 weeks 3 days ago