</widget>
<widget class="QLineEdit">
<property name="name">
- <cstring>toURLLine</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>90</x>
- <y>50</y>
- <width>280</width>
- <height>20</height>
- </rect>
- </property>
- </widget>
- <widget class="QLineEdit">
- <property name="name">
<cstring>fromURLLine</cstring>
</property>
<property name="geometry">
<string>replace</string>
</property>
</widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>toURLLine</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>90</x>
+ <y>50</y>
+ <width>280</width>
+ <height>20</height>
+ </rect>
+ </property>
+ </widget>
</widget>
+<tabstops>
+ <tabstop>fromURLLine</tabstop>
+ <tabstop>toURLLine</tabstop>
+ <tabstop>replaceButton</tabstop>
+</tabstops>
<layoutdefaults spacing="6" margin="11"/>
</UI>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qlistbox.h>
+#include <qmessagebox.h>
#include "kitafontprefbase.h"
#include "kitaconfig.h"
+#include "debugprefbase.h"
using namespace Kita;
{
QString fromURL = fromURLLine->text();
QString toURL = toURLLine->text();
-
- FavoriteThreads::replace( fromURL, toURL );
- Kita::Thread::replace( fromURL, toURL );
- KitaThreadInfo::replace( fromURL, toURL );
+
+ if ( QMessageBox::warning( this, QString( "replace" ),
+ QString( "This tool may possibly break thread's info.\n"
+ "Please create backups of '~/.kde/share/apps/kita/cache' "
+ "and '~/.kde/share/apps/kita/favorites.xml' before performing.\n"
+ "Are you ready?" ), QMessageBox::Ok, QMessageBox::Cancel | QMessageBox::Default | QMessageBox::Escape ) == QMessageBox::Ok ) {
+ FavoriteThreads::replace( fromURL, toURL );
+ Kita::Thread::replace( fromURL, toURL );
+ KitaThreadInfo::replace( fromURL, toURL );
+
+ QMessageBox::information( this, "replace", "Complete." );
+ }
}
AsciiArtPrefPage::AsciiArtPrefPage( QWidget* parent )