QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
This commit is contained in:
committed by
wmayer
parent
d5c074f80d
commit
cd2db00f22
@@ -141,7 +141,7 @@ void DlgCustomKeyboardImp::on_commandTreeWidget_currentItemChanged(QTreeWidgetIt
|
||||
if (cmd) {
|
||||
if (cmd->getAction()) {
|
||||
QKeySequence ks = cmd->getAction()->shortcut();
|
||||
QKeySequence ks2 = QString::fromAscii(cmd->getAccel());
|
||||
QKeySequence ks2 = QString::fromLatin1(cmd->getAccel());
|
||||
QKeySequence ks3 = editShortcut->text();
|
||||
|
||||
if (ks.isEmpty())
|
||||
@@ -152,7 +152,7 @@ void DlgCustomKeyboardImp::on_commandTreeWidget_currentItemChanged(QTreeWidgetIt
|
||||
buttonAssign->setEnabled(!editShortcut->text().isEmpty() && (ks != ks3));
|
||||
buttonReset->setEnabled((ks != ks2));
|
||||
} else {
|
||||
QKeySequence ks = QString::fromAscii(cmd->getAccel());
|
||||
QKeySequence ks = QString::fromLatin1(cmd->getAccel());
|
||||
if (ks.isEmpty())
|
||||
accelLineEditShortcut->setText( tr("none") );
|
||||
else
|
||||
@@ -273,7 +273,7 @@ void DlgCustomKeyboardImp::on_buttonReset_clicked()
|
||||
CommandManager & cCmdMgr = Application::Instance->commandManager();
|
||||
Command* cmd = cCmdMgr.getCommandByName(name.constData());
|
||||
if (cmd && cmd->getAction()) {
|
||||
cmd->getAction()->setShortcut(QString::fromAscii(cmd->getAccel()));
|
||||
cmd->getAction()->setShortcut(QString::fromLatin1(cmd->getAccel()));
|
||||
QString txt = cmd->getAction()->shortcut();
|
||||
accelLineEditShortcut->setText((txt.isEmpty() ? tr("none") : txt));
|
||||
ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("Shortcut");
|
||||
@@ -290,7 +290,7 @@ void DlgCustomKeyboardImp::on_buttonResetAll_clicked()
|
||||
std::vector<Command*> cmds = cCmdMgr.getAllCommands();
|
||||
for (std::vector<Command*>::iterator it = cmds.begin(); it != cmds.end(); ++it) {
|
||||
if ((*it)->getAction()) {
|
||||
(*it)->getAction()->setShortcut(QKeySequence(QString::fromAscii((*it)->getAccel())));
|
||||
(*it)->getAction()->setShortcut(QKeySequence(QString::fromLatin1((*it)->getAccel())));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ void DlgCustomKeyboardImp::on_editShortcut_textChanged(const QString& sc)
|
||||
for (QList<QAction*>::iterator jt = acts.begin(); jt != acts.end(); ++jt) {
|
||||
if ((*jt)->shortcut() == ks) {
|
||||
++countAmbiguous;
|
||||
ambiguousCommand = QString::fromAscii((*it)->getName()); // store the last one
|
||||
ambiguousCommand = QString::fromLatin1((*it)->getName()); // store the last one
|
||||
ambiguousMenu = qApp->translate((*it)->className(), (*it)->getMenuText());
|
||||
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem(assignedTreeWidget);
|
||||
|
||||
Reference in New Issue
Block a user