Skip to content

Commit 47a6bd6

Browse files
committed
Fix for uncomment keyboard shortcut.
1 parent f6d9dfa commit 47a6bd6

File tree

6 files changed

+18
-7
lines changed

6 files changed

+18
-7
lines changed

BSD/share/sasm/keys.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ paste=default
1414
delete=default
1515
selectAll=default
1616
comment=Shift+Ctrl+A
17-
uncomment=Shift+Ctrl+S
17+
uncomment=Shift+Ctrl+Q
1818
deleteTab=Shift+Tab
1919
build=Ctrl+F9
2020
run=F9

Linux/share/sasm/keys.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ paste=default
1414
delete=default
1515
selectAll=default
1616
comment=Shift+Ctrl+A
17-
uncomment=Shift+Ctrl+S
17+
uncomment=Shift+Ctrl+Q
1818
deleteTab=Shift+Tab
1919
build=Ctrl+F9
2020
run=F9

Windows/keys.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ paste=default
1414
delete=default
1515
selectAll=default
1616
comment=Shift+Ctrl+A
17-
uncomment=Shift+Ctrl+S
17+
uncomment=Shift+Ctrl+Q
1818
deleteTab=Shift+Tab
1919
build=Ctrl+F9
2020
run=F9

mainwindow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ void MainWindow::createActions()
364364

365365
uncommentAction = new QAction(tr("Remove comment"), this);
366366
key = keySettings.value("uncomment", "default").toString();
367-
stdKey = QKeySequence(QString("Shift+Ctrl+S"));
367+
stdKey = QKeySequence(QString("Shift+Ctrl+Q"));
368368
if (key == "default")
369369
key = stdKey.toString();
370370
uncommentAction->setShortcut(key);
@@ -2226,7 +2226,7 @@ void MainWindow::openAbout()
22262226
tr("simple Open Source IDE for NASM, MASM, GAS and FASM assembler languages.") + '\n' +
22272227
tr("Licensed under the GNU GPL v3.0") + '\n' +
22282228
tr("Based on the Qt.") + '\n' +
2229-
tr("Copyright © 2013 Dmitriy Manushin") + '\n' +
2229+
tr("Copyright (c) 2013 Dmitriy Manushin") + '\n' +
22302230
tr("Development and idea - Dmitriy Manushin") + '\n' +
22312231
tr("Icon and advices - Alick Gaybullaev") + '\n' + '\n' +
22322232
tr("Wishes and error messages are sent to the e-mail: [email protected]") + '\n' +

ruqplaintextedit.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,22 @@ RuQPlainTextEdit::RuQPlainTextEdit(QWidget *parent) :
5656

5757
setDebugDisabled();
5858

59+
QSettings keySettings(Common::applicationDataPath() + "/keys.ini", QSettings::IniFormat);
60+
5961
commentAction = new QAction(tr("Comment"), this);
60-
commentAction->setShortcut(QString("Ctrl+Shift+Q"));
62+
QString key = keySettings.value("comment", "default").toString();
63+
QKeySequence stdKey = QKeySequence(QString("Shift+Ctrl+A"));
64+
if (key == "default")
65+
key = stdKey.toString();
66+
commentAction->setShortcut(key);
6167
connect(commentAction, SIGNAL(triggered()), this, SLOT(commentSelectedCode()));
6268

6369
uncommentAction = new QAction(tr("Remove comment"), this);
64-
uncommentAction->setShortcut(QString("Ctrl+Shift+A"));
70+
key = keySettings.value("uncomment", "default").toString();
71+
stdKey = QKeySequence(QString("Shift+Ctrl+Q"));
72+
if (key == "default")
73+
key = stdKey.toString();
74+
uncommentAction->setShortcut(key);
6575
connect(uncommentAction, SIGNAL(triggered()), this, SLOT(uncommentSelectedCode()));
6676

6777
undoAction = new QAction(tr("Undo"), this);

ruqplaintextedit.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#include <QTextStream>
5050
#include <QPointer>
5151
#include <QSettings>
52+
#include "common.h"
5253

5354
/**
5455
* @file ruqplaintextedit.h

0 commit comments

Comments
 (0)