Commit a1565d24 authored by Michael Reeves's avatar Michael Reeves
Browse files

*KShortcut -> QKeySequence

*don't use QByteArray for strings.
parent 6c12272f
......@@ -3379,13 +3379,13 @@ void DirectoryMergeWindow::initDirectoryMergeActions( QObject* pKDiff3App, KActi
#include "xpm/showfilesonlyinc.xpm"
DirectoryMergeWindow* p = this;
d->m_pDirStartOperation = KDiff3::createAction< QAction >(i18n("Start/Continue Directory Merge"), KShortcut( Qt::Key_F7 ), p, SLOT(slotRunOperationForAllItems()), ac, "dir_start_operation");
d->m_pDirRunOperationForCurrentItem = KDiff3::createAction< QAction >(i18n("Run Operation for Current Item"), KShortcut( Qt::Key_F6 ), p, SLOT(slotRunOperationForCurrentItem()), ac, "dir_run_operation_for_current_item");
d->m_pDirStartOperation = KDiff3::createAction< QAction >(i18n("Start/Continue Directory Merge"), QKeySequence( Qt::Key_F7 ), p, SLOT(slotRunOperationForAllItems()), ac, "dir_start_operation");
d->m_pDirRunOperationForCurrentItem = KDiff3::createAction< QAction >(i18n("Run Operation for Current Item"), QKeySequence( Qt::Key_F6 ), p, SLOT(slotRunOperationForCurrentItem()), ac, "dir_run_operation_for_current_item");
d->m_pDirCompareCurrent = KDiff3::createAction< QAction >(i18n("Compare Selected File"), p, SLOT(compareCurrentFile()), ac, "dir_compare_current");
d->m_pDirMergeCurrent = KDiff3::createAction< QAction >(i18n("Merge Current File"), QIcon(QPixmap(startmerge)), i18n("Merge\nFile"), pKDiff3App, SLOT(slotMergeCurrentFile()), ac, "merge_current");
d->m_pDirFoldAll = KDiff3::createAction< QAction >(i18n("Fold All Subdirs"), p, SLOT(collapseAll()), ac, "dir_fold_all");
d->m_pDirUnfoldAll = KDiff3::createAction< QAction >(i18n("Unfold All Subdirs"), p, SLOT(expandAll()), ac, "dir_unfold_all");
d->m_pDirRescan = KDiff3::createAction< QAction >(i18n("Rescan"), KShortcut( Qt::SHIFT+Qt::Key_F5 ), p, SLOT(reload()), ac, "dir_rescan");
d->m_pDirRescan = KDiff3::createAction< QAction >(i18n("Rescan"), QKeySequence( Qt::SHIFT+Qt::Key_F5 ), p, SLOT(reload()), ac, "dir_rescan");
d->m_pDirSaveMergeState = 0; //KDiff3::createAction< QAction >(i18n("Save Directory Merge State ..."), 0, p, SLOT(slotSaveMergeState()), ac, "dir_save_merge_state");
d->m_pDirLoadMergeState = 0; //KDiff3::createAction< QAction >(i18n("Load Directory Merge State ..."), 0, p, SLOT(slotLoadMergeState()), ac, "dir_load_merge_state");
d->m_pDirChooseAEverywhere = KDiff3::createAction< QAction >(i18n("Choose A for All Items"), p, SLOT(slotChooseAEverywhere()), ac, "dir_choose_a_everywhere");
......
......@@ -59,7 +59,7 @@ namespace KDiff3 {
template <class T>
T* createAction(
const QString& text,
const KShortcut& shortcut,
const QKeySequence& shortcut,
const QObject* receiver,
const char* slot,
KActionCollection* ac,
......@@ -101,7 +101,7 @@ namespace KDiff3 {
T* createAction(
const QString& text,
const QIcon& icon,
const KShortcut& shortcut,
const QKeySequence& shortcut,
const QObject* receiver,
const char* slot,
KActionCollection* ac,
......@@ -116,7 +116,7 @@ namespace KDiff3 {
const QString& text,
const QIcon& icon,
const QString& iconText,
const KShortcut& shortcut,
const QKeySequence& shortcut,
const QObject* receiver,
const char* slot,
KActionCollection* ac,
......
......@@ -481,7 +481,7 @@ void KDiff3App::initActions( KActionCollection* ac )
fileOpen = KStandardAction::open(this, SLOT(slotFileOpen()), ac);
fileOpen->setStatusTip(i18n("Opens documents for comparison..."));
fileReload = KDiff3::createAction< QAction >( i18n("Reload"), KShortcut( Qt::Key_F5 ), this, SLOT(slotReload()), ac, "file_reload" );
fileReload = KDiff3::createAction< QAction >( i18n("Reload"), QKeySequence( Qt::Key_F5 ), this, SLOT(slotReload()), ac, "file_reload" );
fileSave = KStandardAction::save(this, SLOT(slotFileSave()), ac);
fileSave->setStatusTip(i18n("Saves the merge result. All conflicts must be solved!"));
......@@ -534,7 +534,7 @@ void KDiff3App::initActions( KActionCollection* ac )
#include "xpm/showlinenumbers.xpm"
//#include "reload.xpm"
goCurrent = KDiff3::createAction< QAction >( i18n("Go to Current Delta"), QIcon(QPixmap(currentpos)), i18n("Current\nDelta"), KShortcut( Qt::CTRL+Qt::Key_Space ), this, SLOT(slotGoCurrent()), ac, "go_current");
goCurrent = KDiff3::createAction< QAction >( i18n("Go to Current Delta"), QIcon(QPixmap(currentpos)), i18n("Current\nDelta"), QKeySequence( Qt::CTRL+Qt::Key_Space ), this, SLOT(slotGoCurrent()), ac, "go_current");
goTop = KDiff3::createAction< QAction >(i18n("Go to First Delta"), QIcon(QPixmap(upend)), i18n("First\nDelta"), this, SLOT(slotGoTop()), ac, "go_top");
......@@ -542,30 +542,30 @@ void KDiff3App::initActions( KActionCollection* ac )
QString omitsWhitespace = ".\n" + i18n("(Skips white space differences when \"Show White Space\" is disabled.)");
QString includeWhitespace = ".\n" + i18n("(Does not skip white space differences even when \"Show White Space\" is disabled.)");
goPrevDelta = KDiff3::createAction< QAction >(i18n("Go to Previous Delta"), QIcon(QPixmap(up1arrow)), i18n("Prev\nDelta"), KShortcut( Qt::CTRL+Qt::Key_Up), this, SLOT(slotGoPrevDelta()), ac, "go_prev_delta");
goPrevDelta = KDiff3::createAction< QAction >(i18n("Go to Previous Delta"), QIcon(QPixmap(up1arrow)), i18n("Prev\nDelta"), QKeySequence( Qt::CTRL+Qt::Key_Up), this, SLOT(slotGoPrevDelta()), ac, "go_prev_delta");
goPrevDelta->setToolTip( goPrevDelta->text() + omitsWhitespace );
goNextDelta = KDiff3::createAction< QAction >(i18n("Go to Next Delta"), QIcon(QPixmap(down1arrow)), i18n("Next\nDelta"), KShortcut( Qt::CTRL+Qt::Key_Down ), this, SLOT(slotGoNextDelta()), ac, "go_next_delta");
goNextDelta = KDiff3::createAction< QAction >(i18n("Go to Next Delta"), QIcon(QPixmap(down1arrow)), i18n("Next\nDelta"), QKeySequence( Qt::CTRL+Qt::Key_Down ), this, SLOT(slotGoNextDelta()), ac, "go_next_delta");
goNextDelta->setToolTip( goNextDelta->text() + omitsWhitespace );
goPrevConflict = KDiff3::createAction< QAction >(i18n("Go to Previous Conflict"), QIcon(QPixmap(up2arrow)), i18n("Prev\nConflict"), KShortcut( Qt::CTRL+Qt::Key_PageUp ), this, SLOT(slotGoPrevConflict()), ac, "go_prev_conflict");
goPrevConflict = KDiff3::createAction< QAction >(i18n("Go to Previous Conflict"), QIcon(QPixmap(up2arrow)), i18n("Prev\nConflict"), QKeySequence( Qt::CTRL+Qt::Key_PageUp ), this, SLOT(slotGoPrevConflict()), ac, "go_prev_conflict");
goPrevConflict->setToolTip( goPrevConflict->text() + omitsWhitespace );
goNextConflict = KDiff3::createAction< QAction >(i18n("Go to Next Conflict"), QIcon(QPixmap(down2arrow)), i18n("Next\nConflict"), KShortcut( Qt::CTRL+Qt::Key_PageDown ), this, SLOT(slotGoNextConflict()), ac, "go_next_conflict");
goNextConflict = KDiff3::createAction< QAction >(i18n("Go to Next Conflict"), QIcon(QPixmap(down2arrow)), i18n("Next\nConflict"), QKeySequence( Qt::CTRL+Qt::Key_PageDown ), this, SLOT(slotGoNextConflict()), ac, "go_next_conflict");
goNextConflict->setToolTip( goNextConflict->text() + omitsWhitespace );
goPrevUnsolvedConflict = KDiff3::createAction< QAction >(i18n("Go to Previous Unsolved Conflict"), QIcon(QPixmap(prevunsolved)), i18n("Prev\nUnsolved"), this, SLOT(slotGoPrevUnsolvedConflict()), ac, "go_prev_unsolved_conflict");
goPrevUnsolvedConflict->setToolTip( goPrevUnsolvedConflict->text() + includeWhitespace );
goNextUnsolvedConflict = KDiff3::createAction< QAction >(i18n("Go to Next Unsolved Conflict"), QIcon(QPixmap(nextunsolved)), i18n("Next\nUnsolved"), this, SLOT(slotGoNextUnsolvedConflict()), ac, "go_next_unsolved_conflict");
goNextUnsolvedConflict->setToolTip( goNextUnsolvedConflict->text() + includeWhitespace );
chooseA = KDiff3::createAction< KToggleAction >(i18n("Select Line(s) From A"), QIcon(QPixmap(iconA)), i18n("Choose\nA"), KShortcut( Qt::CTRL+Qt::Key_1 ), this, SLOT(slotChooseA()), ac, "merge_choose_a");
chooseB = KDiff3::createAction< KToggleAction >(i18n("Select Line(s) From B"), QIcon(QPixmap(iconB)), i18n("Choose\nB"), KShortcut( Qt::CTRL+Qt::Key_2 ), this, SLOT(slotChooseB()), ac, "merge_choose_b");
chooseC = KDiff3::createAction< KToggleAction >(i18n("Select Line(s) From C"), QIcon(QPixmap(iconC)), i18n("Choose\nC"), KShortcut( Qt::CTRL+Qt::Key_3 ), this, SLOT(slotChooseC()), ac, "merge_choose_c");
chooseA = KDiff3::createAction< KToggleAction >(i18n("Select Line(s) From A"), QIcon(QPixmap(iconA)), i18n("Choose\nA"), QKeySequence( Qt::CTRL+Qt::Key_1 ), this, SLOT(slotChooseA()), ac, "merge_choose_a");
chooseB = KDiff3::createAction< KToggleAction >(i18n("Select Line(s) From B"), QIcon(QPixmap(iconB)), i18n("Choose\nB"), QKeySequence( Qt::CTRL+Qt::Key_2 ), this, SLOT(slotChooseB()), ac, "merge_choose_b");
chooseC = KDiff3::createAction< KToggleAction >(i18n("Select Line(s) From C"), QIcon(QPixmap(iconC)), i18n("Choose\nC"), QKeySequence( Qt::CTRL+Qt::Key_3 ), this, SLOT(slotChooseC()), ac, "merge_choose_c");
autoAdvance = KDiff3::createAction< KToggleAction >(i18n("Automatically Go to Next Unsolved Conflict After Source Selection"), QIcon(QPixmap(autoadvance)), i18n("Auto\nNext"), this, SLOT(slotAutoAdvanceToggled()), ac, "merge_autoadvance");
showWhiteSpaceCharacters = KDiff3::createAction< KToggleAction >(i18n("Show Space && Tabulator Characters"), QIcon(QPixmap(showwhitespacechars)), i18n("White\nCharacters"), this, SLOT(slotShowWhiteSpaceToggled()), ac, "diff_show_whitespace_characters");
showWhiteSpace = KDiff3::createAction< KToggleAction >(i18n("Show White Space"), QIcon(QPixmap(showwhitespace)), i18n("White\nDeltas"), this, SLOT(slotShowWhiteSpaceToggled()), ac, "diff_show_whitespace");
showLineNumbers = KDiff3::createAction< KToggleAction >(i18n("Show Line Numbers"), QIcon(QPixmap(showlinenumbers)), i18n("Line\nNumbers"), this, SLOT(slotShowLineNumbersToggled()), ac, "diff_showlinenumbers");
chooseAEverywhere = KDiff3::createAction< QAction >(i18n("Choose A Everywhere"), KShortcut( Qt::CTRL+Qt::SHIFT+Qt::Key_1 ), this, SLOT(slotChooseAEverywhere()), ac, "merge_choose_a_everywhere");
chooseBEverywhere = KDiff3::createAction< QAction >(i18n("Choose B Everywhere"), KShortcut( Qt::CTRL+Qt::SHIFT+Qt::Key_2 ), this, SLOT(slotChooseBEverywhere()), ac, "merge_choose_b_everywhere");
chooseCEverywhere = KDiff3::createAction< QAction >(i18n("Choose C Everywhere"), KShortcut( Qt::CTRL+Qt::SHIFT+Qt::Key_3 ), this, SLOT(slotChooseCEverywhere()), ac, "merge_choose_c_everywhere");
chooseAEverywhere = KDiff3::createAction< QAction >(i18n("Choose A Everywhere"), QKeySequence( Qt::CTRL+Qt::SHIFT+Qt::Key_1 ), this, SLOT(slotChooseAEverywhere()), ac, "merge_choose_a_everywhere");
chooseBEverywhere = KDiff3::createAction< QAction >(i18n("Choose B Everywhere"), QKeySequence( Qt::CTRL+Qt::SHIFT+Qt::Key_2 ), this, SLOT(slotChooseBEverywhere()), ac, "merge_choose_b_everywhere");
chooseCEverywhere = KDiff3::createAction< QAction >(i18n("Choose C Everywhere"), QKeySequence( Qt::CTRL+Qt::SHIFT+Qt::Key_3 ), this, SLOT(slotChooseCEverywhere()), ac, "merge_choose_c_everywhere");
chooseAForUnsolvedConflicts = KDiff3::createAction< QAction >(i18n("Choose A for All Unsolved Conflicts"), this, SLOT(slotChooseAForUnsolvedConflicts()), ac, "merge_choose_a_for_unsolved_conflicts");
chooseBForUnsolvedConflicts = KDiff3::createAction< QAction >(i18n("Choose B for All Unsolved Conflicts"), this, SLOT(slotChooseBForUnsolvedConflicts()), ac, "merge_choose_b_for_unsolved_conflicts");
chooseCForUnsolvedConflicts = KDiff3::createAction< QAction >(i18n("Choose C for All Unsolved Conflicts"), this, SLOT(slotChooseCForUnsolvedConflicts()), ac, "merge_choose_c_for_unsolved_conflicts");
......@@ -582,20 +582,20 @@ void KDiff3App::initActions( KActionCollection* ac )
showWindowA = KDiff3::createAction< KToggleAction >(i18n("Show Window A"), this, SLOT(slotShowWindowAToggled()), ac, "win_show_a");
showWindowB = KDiff3::createAction< KToggleAction >(i18n("Show Window B"), this, SLOT(slotShowWindowBToggled()), ac, "win_show_b");
showWindowC = KDiff3::createAction< KToggleAction >(i18n("Show Window C"), this, SLOT(slotShowWindowCToggled()), ac, "win_show_c");
winFocusNext = KDiff3::createAction< QAction >(i18n("Focus Next Window"), KShortcut( Qt::ALT+Qt::Key_Right ), this, SLOT(slotWinFocusNext()), ac, "win_focus_next");
winFocusNext = KDiff3::createAction< QAction >(i18n("Focus Next Window"), QKeySequence( Qt::ALT+Qt::Key_Right ), this, SLOT(slotWinFocusNext()), ac, "win_focus_next");
overviewModeNormal = KDiff3::createAction< KToggleAction >(i18n("Normal Overview"), this, SLOT(slotOverviewNormal()), ac, "diff_overview_normal");
overviewModeAB = KDiff3::createAction< KToggleAction >(i18n("A vs. B Overview"), this, SLOT(slotOverviewAB()), ac, "diff_overview_ab");
overviewModeAC = KDiff3::createAction< KToggleAction >(i18n("A vs. C Overview"), this, SLOT(slotOverviewAC()), ac, "diff_overview_ac");
overviewModeBC = KDiff3::createAction< KToggleAction >(i18n("B vs. C Overview"), this, SLOT(slotOverviewBC()), ac, "diff_overview_bc");
wordWrap = KDiff3::createAction< KToggleAction >(i18n("Word Wrap Diff Windows"), this, SLOT(slotWordWrapToggled()), ac, "diff_wordwrap");
addManualDiffHelp = KDiff3::createAction< QAction >(i18n("Add Manual Diff Alignment"), KShortcut( Qt::CTRL+Qt::Key_Y ), this, SLOT(slotAddManualDiffHelp()), ac, "diff_add_manual_diff_help");
clearManualDiffHelpList = KDiff3::createAction< QAction >(i18n("Clear All Manual Diff Alignments"), KShortcut( Qt::CTRL+Qt::SHIFT+Qt::Key_Y ), this, SLOT(slotClearManualDiffHelpList()), ac, "diff_clear_manual_diff_help_list");
addManualDiffHelp = KDiff3::createAction< QAction >(i18n("Add Manual Diff Alignment"), QKeySequence( Qt::CTRL+Qt::Key_Y ), this, SLOT(slotAddManualDiffHelp()), ac, "diff_add_manual_diff_help");
clearManualDiffHelpList = KDiff3::createAction< QAction >(i18n("Clear All Manual Diff Alignments"), QKeySequence( Qt::CTRL+Qt::SHIFT+Qt::Key_Y ), this, SLOT(slotClearManualDiffHelpList()), ac, "diff_clear_manual_diff_help_list");
#if defined(_WIN32) || defined(Q_OS_OS2)
KDiff3::createAction< QAction >(i18n("Focus Next Window"), KShortcut(Qt::CTRL+Qt::Key_Tab), this, SLOT(slotWinFocusNext()), ac, "win_focus_next");
KDiff3::createAction< QAction >(i18n("Focus Next Window"), QKeySequence(Qt::CTRL+Qt::Key_Tab), this, SLOT(slotWinFocusNext()), ac, "win_focus_next");
#endif
winFocusPrev = KDiff3::createAction< QAction >(i18n("Focus Prev Window"), KShortcut( Qt::ALT+Qt::Key_Left ), this, SLOT(slotWinFocusPrev()), ac, "win_focus_prev");
winFocusPrev = KDiff3::createAction< QAction >(i18n("Focus Prev Window"), QKeySequence( Qt::ALT+Qt::Key_Left ), this, SLOT(slotWinFocusPrev()), ac, "win_focus_prev");
winToggleSplitOrientation = KDiff3::createAction< QAction >(i18n("Toggle Split Orientation"), this, SLOT(slotWinToggleSplitterOrientation()), ac, "win_toggle_split_orientation");
dirShowBoth = KDiff3::createAction< KToggleAction >(i18n("Dir && Text Split Screen View"), this, SLOT(slotDirShowBoth()), ac, "win_dir_show_both");
......
......@@ -177,20 +177,20 @@ int main(int argc, char *argv[])
appVersion += " (32 bit)";
const QString description = i18n("Tool for Comparison and Merge of Files and Directories");
const QString copyright = i18n("(c) 2002-2012 Joachim Eibl");
const QByteArray& homePage = "http://kdiff3.sourceforge.net/";
const QByteArray& bugsAddress = "joachim.eibl@gmx.de";
const QString& homePage = QStringLiteral("http://kdiff3.sourceforge.net/");
const QString& bugsAddress = QStringLiteral("joachim.eibl@gmx.de");
KLocalizedString::setApplicationDomain(appCatalog);
KAboutData aboutData( appName, i18nName,
appVersion, description, KAboutLicense::GPL_V2, copyright, description,
homePage, bugsAddress );
aboutData.addAuthor(i18n("Joachim Eibl"), QString(), QByteArray("joachim.eibl@gmx.de"));
aboutData.addAuthor(i18n("Joachim Eibl"), QString(), QStringLiteral("joachim.eibl@gmx.de"));
aboutData.addCredit(i18n("Eike Sauer"), i18n("Bugfixes, Debian package maintainer") );
aboutData.addCredit(i18n("Sebastien Fricker"), i18n("Windows installer") );
aboutData.addCredit(i18n("Stephan Binner"), i18n("i18n-help"), QByteArray("binner@kde.org") );
aboutData.addCredit(i18n("Stephan Binner"), i18n("i18n-help"), QStringLiteral("binner@kde.org") );
aboutData.addCredit(i18n("Stefan Partheymueller"), i18n("Clipboard-patch" ));
aboutData.addCredit(i18n("David Faure"), i18n("KIO-Help"), QByteArray("faure@kde.org" ));
aboutData.addCredit(i18n("David Faure"), i18n("KIO-Help"), QStringLiteral("faure@kde.org" ));
aboutData.addCredit(i18n("Bernd Gehrmann"), i18n("Class CvsIgnoreList from Cervisia" ));
aboutData.addCredit(i18n("Andre Woebbeking"), i18n("Class StringMatcher" ));
aboutData.addCredit(i18n("Michael Denio"), i18n("Directory Equality-Coloring patch"));
......@@ -199,8 +199,8 @@ int main(int argc, char *argv[])
aboutData.addCredit(i18n("Paul Eggert, Mike Haertel, David Hayes, Richard Stallman, Len Tower"), i18n("GNU-Diffutils"));
aboutData.addCredit(i18n("Tino Boellsterling, Timothy Mee"), i18n("Intensive test, use and feedback"));
aboutData.addCredit(i18n("Michael Schmidt"), i18n("Mac support"));
aboutData.addCredit(i18n("Valentin Rusu"), i18n("KDE4 porting"), QByteArray("kde@rusu.info"));
aboutData.addCredit(i18n("Albert Astals Cid"), i18n("KDE4 porting"), QByteArray("aacid@kde.org"));
aboutData.addCredit(i18n("Valentin Rusu"), i18n("KDE4 porting"), QStringLiteral("kde@rusu.info"));
aboutData.addCredit(i18n("Albert Astals Cid"), i18n("KDE4 porting"), QStringLiteral("aacid@kde.org"));
aboutData.addCredit(i18n("Silvan Scherrer"), i18n("OS2 port") );
aboutData.addCredit(i18n("Nigel Stewart"), i18n("Cygwin support") );
aboutData.addCredit(i18n("Maurice van der Pot"), i18n("Framework for automated tests") );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment