QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().

This change is Qt4/Qt5 neutral.
This commit is contained in:
Mateusz Skowroński
2015-12-15 07:00:20 +01:00
committed by wmayer
parent d5c074f80d
commit cd2db00f22
154 changed files with 836 additions and 836 deletions

View File

@@ -104,11 +104,11 @@ SheetView::SheetView(Gui::Document *pcDocument, App::DocumentObject *docObj, QWi
palette.setColor(QPalette::Text, QColor(0, 0, 0));
ui->cells->setPalette(palette);
QList<QtColorPicker*> bgList = Gui::getMainWindow()->findChildren<QtColorPicker*>(QString::fromAscii("Spreadsheet_BackgroundColor"));
QList<QtColorPicker*> bgList = Gui::getMainWindow()->findChildren<QtColorPicker*>(QString::fromLatin1("Spreadsheet_BackgroundColor"));
if (bgList.size() > 0)
bgList[0]->setCurrentColor(palette.color(QPalette::Base));
QList<QtColorPicker*> fgList = Gui::getMainWindow()->findChildren<QtColorPicker*>(QString::fromAscii("Spreadsheet_ForegroundColor"));
QList<QtColorPicker*> fgList = Gui::getMainWindow()->findChildren<QtColorPicker*>(QString::fromLatin1("Spreadsheet_ForegroundColor"));
if (fgList.size() > 0)
fgList[0]->setCurrentColor(palette.color(QPalette::Text));

View File

@@ -181,7 +181,7 @@ SheetView *ViewProviderSheet::showSpreadsheetView()
(this->pcObject->getDocument());
view = new SheetView(doc, this->pcObject, Gui::getMainWindow());
view->setWindowIcon(Gui::BitmapFactory().pixmap(":icons/Spreadsheet.svg"));
view->setWindowTitle(QString::fromUtf8(pcObject->Label.getValue()) + QString::fromAscii("[*]"));
view->setWindowTitle(QString::fromUtf8(pcObject->Label.getValue()) + QString::fromLatin1("[*]"));
Gui::getMainWindow()->addWindow(view);
startEditing();
}

View File

@@ -65,7 +65,7 @@ Workbench::~Workbench()
void Workbench::activated()
{
if (!initialized) {
QList<QToolBar*> bars = Gui::getMainWindow()->findChildren<QToolBar*>(QString::fromAscii("Spreadsheet"));
QList<QToolBar*> bars = Gui::getMainWindow()->findChildren<QToolBar*>(QString::fromLatin1("Spreadsheet"));
if (bars.size() == 1) {
QToolBar * bar = bars[0];
@@ -73,24 +73,24 @@ void Workbench::activated()
QtColorPicker * backgroundColor;
QPalette palette = Gui::getMainWindow()->palette();
QList<QtColorPicker*> fgList = Gui::getMainWindow()->findChildren<QtColorPicker*>(QString::fromAscii("Spreadsheet_ForegroundColor"));
QList<QtColorPicker*> fgList = Gui::getMainWindow()->findChildren<QtColorPicker*>(QString::fromLatin1("Spreadsheet_ForegroundColor"));
if (fgList.size() > 0)
foregroundColor = fgList[0];
else {
foregroundColor = new QtColorPicker();
foregroundColor->setObjectName(QString::fromAscii("Spreadsheet_ForegroundColor"));
foregroundColor->setObjectName(QString::fromLatin1("Spreadsheet_ForegroundColor"));
foregroundColor->setStandardColors();
foregroundColor->setCurrentColor(palette.color(QPalette::Foreground));
QObject::connect(foregroundColor, SIGNAL(colorSet(QColor)), workbenchHelper.get(), SLOT(setForegroundColor(QColor)));
}
bar->addWidget(foregroundColor);
QList<QtColorPicker*> bgList = Gui::getMainWindow()->findChildren<QtColorPicker*>(QString::fromAscii("Spreadsheet_BackgroundColor"));
QList<QtColorPicker*> bgList = Gui::getMainWindow()->findChildren<QtColorPicker*>(QString::fromLatin1("Spreadsheet_BackgroundColor"));
if (bgList.size() > 0)
backgroundColor = bgList[0];
else {
backgroundColor = new QtColorPicker();
backgroundColor->setObjectName(QString::fromAscii("Spreadsheet_BackgroundColor"));
backgroundColor->setObjectName(QString::fromLatin1("Spreadsheet_BackgroundColor"));
backgroundColor->setStandardColors();
backgroundColor->setCurrentColor(palette.color(QPalette::Base));
QObject::connect(backgroundColor, SIGNAL(colorSet(QColor)), workbenchHelper.get(), SLOT(setBackgroundColor(QColor)));