Qt5: 'static QString Gui::TaskView::TaskWatcherCommands::trUtf8(const char*, const char*, int)' is deprecated [-Wdeprecated-declarations]
This commit is contained in:
@@ -73,16 +73,16 @@ ComboView::ComboView(bool showModel, Gui::Document* pcDocument, QWidget *parent)
|
||||
// property view
|
||||
prop = new PropertyView(this);
|
||||
splitter->addWidget(prop);
|
||||
modelIndex = tabs->addTab(splitter,trUtf8("Model"));
|
||||
modelIndex = tabs->addTab(splitter,tr("Model"));
|
||||
}
|
||||
|
||||
// task panel
|
||||
taskPanel = new Gui::TaskView::TaskView(this);
|
||||
taskIndex = tabs->addTab(taskPanel, trUtf8("Tasks"));
|
||||
taskIndex = tabs->addTab(taskPanel, tr("Tasks"));
|
||||
|
||||
// task panel
|
||||
//projectView = new Gui::ProjectWidget(this);
|
||||
//tabs->addTab(projectView, trUtf8("Project"));
|
||||
//tabs->addTab(projectView, tr("Project"));
|
||||
}
|
||||
|
||||
ComboView::~ComboView()
|
||||
@@ -137,9 +137,9 @@ void ComboView::showTaskView()
|
||||
void ComboView::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
tabs->setTabText(modelIndex, trUtf8("Model"));
|
||||
tabs->setTabText(taskIndex, trUtf8("Tasks"));
|
||||
//tabs->setTabText(2, trUtf8("Project"));
|
||||
tabs->setTabText(modelIndex, tr("Model"));
|
||||
tabs->setTabText(taskIndex, tr("Tasks"));
|
||||
//tabs->setTabText(2, tr("Project"));
|
||||
}
|
||||
|
||||
DockWindow::changeEvent(e);
|
||||
|
||||
@@ -154,7 +154,7 @@ QDockWidget* DockWindowManager::addDockWindow(const char* name, QWidget* widget,
|
||||
|
||||
// set object name and window title needed for i18n stuff
|
||||
dw->setObjectName(QLatin1String(name));
|
||||
dw->setWindowTitle(QDockWidget::trUtf8(name));
|
||||
dw->setWindowTitle(QDockWidget::tr(name));
|
||||
dw->setFeatures(QDockWidget::AllDockWidgetFeatures);
|
||||
|
||||
d->_dockedWindows.push_back(dw);
|
||||
|
||||
@@ -542,8 +542,8 @@ void PropertyView::tabChanged(int index)
|
||||
void PropertyView::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
tabs->setTabText(0, trUtf8("View"));
|
||||
tabs->setTabText(1, trUtf8("Data"));
|
||||
tabs->setTabText(0, tr("View"));
|
||||
tabs->setTabText(1, tr("Data"));
|
||||
}
|
||||
|
||||
QWidget::changeEvent(e);
|
||||
|
||||
@@ -70,7 +70,7 @@ ReportView::ReportView( QWidget* parent )
|
||||
|
||||
// create the output window
|
||||
tabOutput = new ReportOutput();
|
||||
tabOutput->setWindowTitle(trUtf8("Output"));
|
||||
tabOutput->setWindowTitle(tr("Output"));
|
||||
tabOutput->setWindowIcon(BitmapFactory().pixmap("MacroEditor"));
|
||||
int output = tabWidget->addTab(tabOutput, tabOutput->windowTitle());
|
||||
tabWidget->setTabIcon(output, tabOutput->windowIcon());
|
||||
@@ -78,7 +78,7 @@ ReportView::ReportView( QWidget* parent )
|
||||
// create the python console
|
||||
tabPython = new PythonConsole();
|
||||
tabPython->setWordWrapMode(QTextOption::NoWrap);
|
||||
tabPython->setWindowTitle(trUtf8("Python console"));
|
||||
tabPython->setWindowTitle(tr("Python console"));
|
||||
tabPython->setWindowIcon(BitmapFactory().iconFromTheme("applications-python"));
|
||||
int python = tabWidget->addTab(tabPython, tabPython->windowTitle());
|
||||
tabWidget->setTabIcon(python, tabPython->windowIcon());
|
||||
@@ -102,8 +102,8 @@ void ReportView::changeEvent(QEvent *e)
|
||||
{
|
||||
QWidget::changeEvent(e);
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
tabOutput->setWindowTitle(trUtf8("Output"));
|
||||
tabPython->setWindowTitle(trUtf8("Python console"));
|
||||
tabOutput->setWindowTitle(tr("Output"));
|
||||
tabPython->setWindowTitle(tr("Python console"));
|
||||
for (int i=0; i<tabWidget->count();i++)
|
||||
tabWidget->setTabText(i, tabWidget->widget(i)->windowTitle());
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ TaskWatcherCommands::TaskWatcherCommands(const char* Filter,const char* commands
|
||||
if (commands) {
|
||||
CommandManager &mgr = Gui::Application::Instance->commandManager();
|
||||
Gui::TaskView::TaskBox *tb = new Gui::TaskView::TaskBox
|
||||
(BitmapFactory().pixmap(pixmap), trUtf8(name), true, 0);
|
||||
(BitmapFactory().pixmap(pixmap), tr(name), true, 0);
|
||||
|
||||
for (const char** i=commands;*i;i++) {
|
||||
Command *c = mgr.getCommandByName(*i);
|
||||
|
||||
@@ -90,7 +90,7 @@ void ToolBoxManager::setup( ToolBarItem* toolBar ) const
|
||||
bar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
std::string toolbarName = (*item)->command();
|
||||
bar->setObjectName(QString::fromLatin1((*item)->command().c_str()));
|
||||
bar->setWindowTitle(QObject::trUtf8(toolbarName.c_str())); // i18n
|
||||
bar->setWindowTitle(QObject::tr(toolbarName.c_str())); // i18n
|
||||
_toolBox->addItem( bar, bar->windowTitle() );
|
||||
|
||||
QList<ToolBarItem*> subitems = (*item)->getItems();
|
||||
@@ -129,7 +129,7 @@ void ToolBoxManager::retranslate() const
|
||||
// get always the first item widget
|
||||
QWidget* w = _toolBox->widget(i);
|
||||
QByteArray toolbarName = w->objectName().toUtf8();
|
||||
w->setWindowTitle(QObject::trUtf8(toolbarName.constData()));
|
||||
w->setWindowTitle(QObject::tr(toolbarName.constData()));
|
||||
_toolBox->setItemText(i, w->windowTitle());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user