Merge branch 'master' of github.com:FreeCAD/FreeCAD
This commit is contained in:
@@ -32,7 +32,6 @@
|
||||
#include "Workbench.h"
|
||||
#include "ViewProviderPage.h"
|
||||
#include "ViewProviderView.h"
|
||||
//#include "resources/qrc_Drawing.cpp"
|
||||
|
||||
// use a different name to CreateCommand()
|
||||
void CreateDrawingCommands(void);
|
||||
|
||||
@@ -132,9 +132,9 @@ Gui::Action * CmdDrawingNewPage::createAction(void)
|
||||
|
||||
std::string path = App::Application::getResourceDir();
|
||||
path += "Mod/Drawing/Templates/";
|
||||
QDir dir(QString::fromUtf8(path.c_str()), QString::fromAscii("*.svg"));
|
||||
QDir dir(QString::fromUtf8(path.c_str()), QString::fromLatin1("*.svg"));
|
||||
for (unsigned int i=0; i<dir.count(); i++ ) {
|
||||
QRegExp rx(QString::fromAscii("(A|B|C|D|E)(\\d)_(Landscape|Portrait)(_.*\\.|\\.)svg$"));
|
||||
QRegExp rx(QString::fromLatin1("(A|B|C|D|E)(\\d)_(Landscape|Portrait)(_.*\\.|\\.)svg$"));
|
||||
if (rx.indexIn(dir[i]) > -1) {
|
||||
QString paper = rx.cap(1);
|
||||
int id = rx.cap(2).toInt();
|
||||
@@ -160,12 +160,12 @@ Gui::Action * CmdDrawingNewPage::createAction(void)
|
||||
lastPaper = paper;
|
||||
lastId = id;
|
||||
|
||||
QFile file(QString::fromAscii(":/icons/actions/drawing-landscape-A0.svg"));
|
||||
QFile file(QString::fromLatin1(":/icons/actions/drawing-landscape-A0.svg"));
|
||||
QAction* a = pcAction->addAction(QString());
|
||||
if (file.open(QFile::ReadOnly)) {
|
||||
QString s = QString::fromAscii("style=\"font-size:22px\">%1%2</tspan></text>").arg(paper).arg(id);
|
||||
QString s = QString::fromLatin1("style=\"font-size:22px\">%1%2</tspan></text>").arg(paper).arg(id);
|
||||
QByteArray data = file.readAll();
|
||||
data.replace("style=\"font-size:22px\">A0</tspan></text>", s.toAscii());
|
||||
data.replace("style=\"font-size:22px\">A0</tspan></text>", s.toLatin1());
|
||||
a->setIcon(Gui::BitmapFactory().pixmapFromSvg(data, QSize(64,64)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user