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
0695552cff
commit
c275b35d48
@@ -260,7 +260,7 @@ void ToolBarManager::setup(ToolBarItem* item, QToolBar* toolbar) const
|
||||
QList<QAction*> actions = toolbar->actions();
|
||||
for (QList<ToolBarItem*>::ConstIterator it = items.begin(); it != items.end(); ++it) {
|
||||
// search for the action item
|
||||
QAction* action = findAction(actions, QString::fromAscii((*it)->command().c_str()));
|
||||
QAction* action = findAction(actions, QString::fromLatin1((*it)->command().c_str()));
|
||||
if (!action) {
|
||||
if ((*it)->command() == "Separator") {
|
||||
action = toolbar->addSeparator();
|
||||
@@ -271,7 +271,7 @@ void ToolBarManager::setup(ToolBarItem* item, QToolBar* toolbar) const
|
||||
}
|
||||
|
||||
// set the tool button user data
|
||||
if (action) action->setData(QString::fromAscii((*it)->command().c_str()));
|
||||
if (action) action->setData(QString::fromLatin1((*it)->command().c_str()));
|
||||
} else {
|
||||
// Note: For toolbars we do not remove and readd the actions
|
||||
// because this causes flicker effects. So, it could happen that the order of
|
||||
|
||||
Reference in New Issue
Block a user