[qet] qet/qet: [5461] Revert r5449 and disable r5452 momentary : Load time from elements is |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 5461
Author: scorpio810
Date: 2018-07-30 17:24:29 +0200 (Mon, 30 Jul 2018)
Log Message:
-----------
Revert r5449 and disable r5452 momentary : Load time from elements is
very slow
Modified Paths:
--------------
trunk/sources/ElementsCollection/elementcollectionitem.cpp
trunk/sources/ElementsCollection/elementscollectionmodel.cpp
trunk/sources/ElementsCollection/elementscollectionwidget.cpp
trunk/sources/ElementsCollection/elementstreeview.cpp
trunk/sources/ElementsCollection/fileelementcollectionitem.cpp
trunk/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp
trunk/sources/QPropertyUndoCommand/qpropertyundocommand.cpp
trunk/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp
trunk/sources/aboutqet.cpp
trunk/sources/autoNum/ui/selectautonumw.cpp
trunk/sources/bordertitleblock.cpp
trunk/sources/configdialog.cpp
trunk/sources/configpages.cpp
trunk/sources/createdxf.cpp
trunk/sources/createdxf.h
trunk/sources/diagram.cpp
trunk/sources/diagramcommands.cpp
trunk/sources/diagramcontent.cpp
trunk/sources/diagramcontextwidget.cpp
trunk/sources/diagramevent/diagrameventaddelement.cpp
trunk/sources/diagramevent/diagrameventaddtext.cpp
trunk/sources/diagramfoliolist.cpp
trunk/sources/diagramprintdialog.cpp
trunk/sources/diagramschooser.cpp
trunk/sources/diagramview.cpp
trunk/sources/editor/arceditor.cpp
trunk/sources/editor/elementprimitivedecorator.cpp
trunk/sources/editor/elementscene.cpp
trunk/sources/editor/elementview.cpp
trunk/sources/editor/ellipseeditor.cpp
trunk/sources/editor/graphicspart/partarc.cpp
trunk/sources/editor/graphicspart/partellipse.cpp
trunk/sources/editor/graphicspart/partline.cpp
trunk/sources/editor/graphicspart/partpolygon.cpp
trunk/sources/editor/graphicspart/partrectangle.cpp
trunk/sources/editor/lineeditor.cpp
trunk/sources/editor/polygoneditor.cpp
trunk/sources/editor/qetelementeditor.cpp
trunk/sources/editor/styleeditor.cpp
trunk/sources/editor/terminaleditor.cpp
trunk/sources/editor/texteditor.cpp
trunk/sources/editor/ui/dynamictextfieldeditor.cpp
trunk/sources/editor/ui/elementpropertieseditorwidget.cpp
trunk/sources/editor/ui/rectangleeditor.cpp
trunk/sources/elementdialog.cpp
trunk/sources/elementscategoryeditor.cpp
trunk/sources/elementsmover.cpp
trunk/sources/elementspanel.cpp
trunk/sources/elementspanelwidget.cpp
trunk/sources/elementtextpattern.cpp
trunk/sources/elementtextsmover.cpp
trunk/sources/exportdialog.cpp
trunk/sources/exportpropertieswidget.cpp
trunk/sources/genericpanel.cpp
trunk/sources/nameslistwidget.cpp
trunk/sources/newelementwizard.cpp
trunk/sources/projectconfigpages.cpp
trunk/sources/projectview.cpp
trunk/sources/qet.cpp
trunk/sources/qetapp.cpp
trunk/sources/qetdiagrameditor.cpp
trunk/sources/qetgraphicsitem/conductor.cpp
trunk/sources/qetgraphicsitem/conductortextitem.cpp
trunk/sources/qetgraphicsitem/customelement.cpp
trunk/sources/qetgraphicsitem/dynamicelementtextitem.cpp
trunk/sources/qetgraphicsitem/element.cpp
trunk/sources/qetgraphicsitem/elementtextitemgroup.cpp
trunk/sources/qetgraphicsitem/qetshapeitem.cpp
trunk/sources/qetgraphicsitem/terminal.cpp
trunk/sources/qetprintpreviewdialog.cpp
trunk/sources/qetproject.cpp
trunk/sources/qtextorientationspinboxwidget.cpp
trunk/sources/recentfiles.cpp
trunk/sources/richtext/richtexteditor.cpp
trunk/sources/titleblock/dimensionwidget.cpp
trunk/sources/titleblock/qettemplateeditor.cpp
trunk/sources/titleblock/templatecellwidget.cpp
trunk/sources/titleblock/templatecommands.cpp
trunk/sources/titleblock/templatelogomanager.cpp
trunk/sources/titleblock/templatescollection.cpp
trunk/sources/titleblock/templateview.cpp
trunk/sources/titleblocktemplate.cpp
trunk/sources/ui/conductorpropertiesdialog.cpp
trunk/sources/ui/configpage/generalconfigurationpage.cpp
trunk/sources/ui/diagrampropertiesdialog.cpp
trunk/sources/ui/diagrampropertieseditordockwidget.cpp
trunk/sources/ui/diagramselection.cpp
trunk/sources/ui/dynamicelementtextitemeditor.cpp
trunk/sources/ui/dynamicelementtextmodel.cpp
trunk/sources/ui/elementpropertieswidget.cpp
trunk/sources/ui/importelementdialog.cpp
trunk/sources/ui/linksingleelementwidget.cpp
trunk/sources/ui/masterpropertieswidget.cpp
trunk/sources/ui/multipastedialog.cpp
trunk/sources/ui/potentialselectordialog.cpp
trunk/sources/ui/projectpropertiesdialog.cpp
trunk/sources/undocommand/addelementtextcommand.cpp
trunk/sources/undocommand/changeelementinformationcommand.cpp
trunk/sources/undocommand/linkelementcommand.cpp
trunk/sources/undocommand/rotateselectioncommand.cpp
trunk/sources/undocommand/rotatetextscommand.cpp
Modified: trunk/sources/ElementsCollection/elementcollectionitem.cpp
===================================================================
--- trunk/sources/ElementsCollection/elementcollectionitem.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ElementsCollection/elementcollectionitem.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -75,7 +75,7 @@
{
rowCount();
foreach (QStandardItem *qsi, directChilds()) {
- auto *eci = static_cast<ElementCollectionItem *>(qsi);
+ ElementCollectionItem *eci = static_cast<ElementCollectionItem *>(qsi);
if (eci->name() == name)
return eci;
}
@@ -167,7 +167,7 @@
QList <ElementCollectionItem *> element_child;
foreach (QStandardItem *qsi, directChilds()) {
- auto *eci = static_cast<ElementCollectionItem *>(qsi);
+ ElementCollectionItem *eci = static_cast<ElementCollectionItem *>(qsi);
if (eci->isElement())
element_child.append(eci);
}
@@ -184,7 +184,7 @@
QList <ElementCollectionItem *> dir_child;
foreach (QStandardItem *qsi, directChilds()) {
- auto *eci = static_cast<ElementCollectionItem *>(qsi);
+ ElementCollectionItem *eci = static_cast<ElementCollectionItem *>(qsi);
if (eci->isDir())
dir_child.append(eci);
}
@@ -231,7 +231,7 @@
QList <ElementCollectionItem *> list;
for (int i=0 ; i<rowCount() ; i++) {
- auto *eci = static_cast<ElementCollectionItem *>(child(i));
+ ElementCollectionItem *eci = static_cast<ElementCollectionItem *>(child(i));
list.append(eci);
list.append(eci->items());
}
Modified: trunk/sources/ElementsCollection/elementscollectionmodel.cpp
===================================================================
--- trunk/sources/ElementsCollection/elementscollectionmodel.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ElementsCollection/elementscollectionmodel.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -68,9 +68,9 @@
QModelIndex index = indexes.first();
if (index.isValid())
{
- auto *item = static_cast<ElementCollectionItem*>(itemFromIndex(index));
+ ElementCollectionItem *item = static_cast<ElementCollectionItem*>(itemFromIndex(index));
- auto *mime_data = new QMimeData();
+ QMimeData *mime_data = new QMimeData();
mime_data->setText(item->collectionPath());
if (item->isElement())
@@ -120,7 +120,7 @@
if (static_cast<FileElementCollectionItem *>(qsi)->isCommonCollection())
return false;
- auto *eci = static_cast<ElementCollectionItem *>(qsi);
+ ElementCollectionItem *eci = static_cast<ElementCollectionItem *>(qsi);
if (data->hasFormat("application/x-qet-element-uri") || data->hasFormat("application/x-qet-category-uri"))
{
@@ -156,7 +156,7 @@
if (qsi->type() == FileElementCollectionItem::Type)
{
- auto *feci = static_cast<FileElementCollectionItem *>(qsi);
+ FileElementCollectionItem *feci = static_cast<FileElementCollectionItem *>(qsi);
if (feci->isCommonCollection())
return false;
@@ -185,7 +185,7 @@
return false;
}
else if (qsi->type() == XmlProjectElementCollectionItem::Type) {
- auto *xpeci = static_cast<XmlProjectElementCollectionItem*>(qsi);
+ XmlProjectElementCollectionItem *xpeci = static_cast<XmlProjectElementCollectionItem*>(qsi);
if (xpeci->isElement() && xpeci->parent() && xpeci->parent()->type() == XmlProjectElementCollectionItem::Type)
xpeci = static_cast<XmlProjectElementCollectionItem *>(xpeci->parent());
@@ -254,7 +254,7 @@
*/
void ElementsCollectionModel::addCommonCollection(bool set_data)
{
- auto *feci = new FileElementCollectionItem();
+ FileElementCollectionItem *feci = new FileElementCollectionItem();
if (feci->setRootPath(QETApp::commonElementsDirN(), set_data, m_hide_element)) {
invisibleRootItem()->appendRow(feci);
if (set_data)
@@ -270,7 +270,7 @@
*/
void ElementsCollectionModel::addCustomCollection(bool set_data)
{
- auto *feci = new FileElementCollectionItem();
+ FileElementCollectionItem *feci = new FileElementCollectionItem();
if (feci->setRootPath(QETApp::customElementsDirN(), set_data, m_hide_element)) {
invisibleRootItem()->appendRow(feci);
if (set_data)
@@ -313,7 +313,7 @@
foreach(ElementCollectionItem *eci, child_list) {
if (eci->type() == FileElementCollectionItem::Type) {
- auto *feci = static_cast<FileElementCollectionItem *>(eci);
+ FileElementCollectionItem *feci = static_cast<FileElementCollectionItem *>(eci);
if (feci->isCustomCollection()) {
last_item = feci->lastItemForPath(location.collectionPath(false), collection_name);
@@ -341,7 +341,7 @@
m_project_list.append(project);
int row = m_project_list.indexOf(project);
- auto *xpeci = new XmlProjectElementCollectionItem();
+ XmlProjectElementCollectionItem *xpeci = new XmlProjectElementCollectionItem();
m_project_hash.insert(project, xpeci);
xpeci->setProject(project, set_data);
@@ -419,7 +419,7 @@
QList <ElementCollectionItem *> list;
for (int i=0 ; i<rowCount() ; i++) {
- auto *eci = static_cast<ElementCollectionItem *>(item(i));
+ ElementCollectionItem *eci = static_cast<ElementCollectionItem *>(item(i));
list.append(eci);
list.append(eci->items());
}
@@ -478,7 +478,7 @@
ElementCollectionItem *match_eci = nullptr;
if (eci->type() == FileElementCollectionItem::Type) {
- if (auto *feci = static_cast<FileElementCollectionItem *>(eci)) {
+ if (FileElementCollectionItem *feci = static_cast<FileElementCollectionItem *>(eci)) {
if ( (location.isCommonCollection() && feci->isCommonCollection()) ||
(location.isCustomCollection() && !feci->isCommonCollection()) ) {
match_eci = feci->itemAtPath(location.collectionPath(false));
@@ -486,7 +486,7 @@
}
}
else if (eci->type() == XmlProjectElementCollectionItem::Type) {
- if (auto *xpeci = static_cast<XmlProjectElementCollectionItem *>(eci)) {
+ if (XmlProjectElementCollectionItem *xpeci = static_cast<XmlProjectElementCollectionItem *>(eci)) {
match_eci = xpeci->itemAtPath(location.collectionPath(false));
}
}
@@ -507,7 +507,7 @@
void ElementsCollectionModel::elementIntegratedToCollection(const QString& path)
{
QObject *object = sender();
- auto *collection = static_cast<XmlElementCollection *> (object);
+ XmlElementCollection *collection = static_cast<XmlElementCollection *> (object);
if (!collection)
return;
@@ -540,7 +540,7 @@
void ElementsCollectionModel::itemRemovedFromCollection(const QString& path)
{
QObject *object = sender();
- auto *collection = static_cast<XmlElementCollection *> (object);
+ XmlElementCollection *collection = static_cast<XmlElementCollection *> (object);
if (!collection)
return;
@@ -568,7 +568,7 @@
void ElementsCollectionModel::updateItem(const QString& path)
{
QObject *object = sender();
- auto *collection = static_cast<XmlElementCollection *> (object);
+ XmlElementCollection *collection = static_cast<XmlElementCollection *> (object);
if (!collection)
return;
Modified: trunk/sources/ElementsCollection/elementscollectionwidget.cpp
===================================================================
--- trunk/sources/ElementsCollection/elementscollectionwidget.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ElementsCollection/elementscollectionwidget.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -242,7 +242,7 @@
if (eci->type() == FileElementCollectionItem::Type)
{
add_open_dir = true;
- auto *feci = static_cast<FileElementCollectionItem*>(eci);
+ FileElementCollectionItem *feci = static_cast<FileElementCollectionItem*>(eci);
if (!feci->isCommonCollection())
{
if (feci->isDir())
@@ -261,7 +261,7 @@
}
if (eci->type() == XmlProjectElementCollectionItem::Type)
{
- auto *xpeci = static_cast<XmlProjectElementCollectionItem *>(eci);
+ XmlProjectElementCollectionItem *xpeci = static_cast<XmlProjectElementCollectionItem *>(eci);
if (xpeci->isCollectionRoot())
add_open_dir = true;
}
@@ -404,7 +404,7 @@
if (eci->type() != FileElementCollectionItem::Type) return;
- auto *feci = static_cast<FileElementCollectionItem*>(eci);
+ FileElementCollectionItem *feci = static_cast<FileElementCollectionItem*>(eci);
if(feci->isCommonCollection()) return;
ElementsLocation location(feci->collectionPath());
@@ -424,7 +424,7 @@
if (eci->type() != FileElementCollectionItem::Type) return;
- auto *feci = static_cast<FileElementCollectionItem*>(eci);
+ FileElementCollectionItem *feci = static_cast<FileElementCollectionItem*>(eci);
if(feci->isCommonCollection()) return;
ElementsLocation location(feci->collectionPath());
@@ -445,7 +445,7 @@
return;
}
- auto *feci = static_cast<FileElementCollectionItem*>(eci);
+ FileElementCollectionItem *feci = static_cast<FileElementCollectionItem*>(eci);
if(feci->isCommonCollection()) {
return;
}
@@ -533,7 +533,7 @@
void ElementsCollectionWidget::reload()
{
m_progress_bar->show();
- auto *new_model = new ElementsCollectionModel(m_tree_view);
+ ElementsCollectionModel *new_model = new ElementsCollectionModel(m_tree_view);
QList <QETProject *> project_list;
project_list.append(m_waiting_project);
Modified: trunk/sources/ElementsCollection/elementstreeview.cpp
===================================================================
--- trunk/sources/ElementsCollection/elementstreeview.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ElementsCollection/elementstreeview.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -50,8 +50,8 @@
return;
}
- if (auto *qsim = static_cast<QStandardItemModel *>(model())) {
- if (auto *eci = static_cast<ElementCollectionItem *>(qsim->itemFromIndex(index))) {
+ if (QStandardItemModel *qsim = static_cast<QStandardItemModel *>(model())) {
+ if (ElementCollectionItem *eci = static_cast<ElementCollectionItem *>(qsim->itemFromIndex(index))) {
ElementsLocation loc (eci->collectionPath());
if (loc.exist()) {
startElementDrag(loc);
@@ -72,10 +72,10 @@
if (!location.exist())
return;
- auto *drag = new QDrag(this);
+ QDrag *drag = new QDrag(this);
QString location_str = location.toString();
- auto *mime_data = new QMimeData();
+ QMimeData *mime_data = new QMimeData();
mime_data->setText(location_str);
if (location.isDirectory())
Modified: trunk/sources/ElementsCollection/fileelementcollectionitem.cpp
===================================================================
--- trunk/sources/ElementsCollection/fileelementcollectionitem.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ElementsCollection/fileelementcollectionitem.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -58,7 +58,7 @@
if (isCollectionRoot())
return m_path;
- auto *feci = static_cast<FileElementCollectionItem *> (parent());
+ FileElementCollectionItem *feci = static_cast<FileElementCollectionItem *> (parent());
if (feci)
return feci->fileSystemPath() + "/" + m_path;
else
@@ -172,7 +172,7 @@
return "custom://";
}
else if (parent() && parent()->type() == FileElementCollectionItem::Type) {
- auto *eci = static_cast<ElementCollectionItem*>(parent());
+ ElementCollectionItem *eci = static_cast<ElementCollectionItem*>(parent());
if (eci->isCollectionRoot())
return eci->collectionPath() + m_path;
else
@@ -222,7 +222,7 @@
if (collection_name.isEmpty())
return;
- auto *feci = new FileElementCollectionItem();
+ FileElementCollectionItem *feci = new FileElementCollectionItem();
insertRow(rowForInsertItem(collection_name), feci);
feci->setPathName(collection_name);
feci->setUpData();
@@ -299,7 +299,7 @@
//Get all directory in this directory.
foreach(QString str, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name))
{
- auto *feci = new FileElementCollectionItem();
+ FileElementCollectionItem *feci = new FileElementCollectionItem();
appendRow(feci);
feci->setPathName(str, set_data, hide_element);
if (set_data)
@@ -313,7 +313,7 @@
dir.setNameFilters(QStringList() << "*.elmt");
foreach(QString str, dir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name))
{
- auto *feci = new FileElementCollectionItem();
+ FileElementCollectionItem *feci = new FileElementCollectionItem();
appendRow(feci);
feci->setPathName(str, set_data);
if (set_data)
Modified: trunk/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp
===================================================================
--- trunk/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -102,7 +102,7 @@
if (isCollectionRoot())
return "embed://";
else if (parent()){
- auto *xpeci = static_cast<XmlProjectElementCollectionItem *>(parent());
+ XmlProjectElementCollectionItem *xpeci = static_cast<XmlProjectElementCollectionItem *>(parent());
if (xpeci->isCollectionRoot())
return xpeci->embeddedPath() + name();
@@ -143,7 +143,7 @@
while (!child_element.isNull()) {
if (child_element.attribute("name") == collection_name) {
- auto *xpeci = new XmlProjectElementCollectionItem ();
+ XmlProjectElementCollectionItem *xpeci = new XmlProjectElementCollectionItem ();
insertRow(rowForInsertItem(collection_name), xpeci);
xpeci->setXmlElement(child_element, m_project);
xpeci->setUpData();
@@ -229,7 +229,7 @@
foreach (QDomElement element, dom_category)
{
- auto *xpeci = new XmlProjectElementCollectionItem();
+ XmlProjectElementCollectionItem *xpeci = new XmlProjectElementCollectionItem();
appendRow(xpeci);
xpeci->setXmlElement(element, m_project, set_data, hide_element);
if (set_data)
@@ -244,7 +244,7 @@
foreach (QDomElement element, dom_elements)
{
- auto *xpeci = new XmlProjectElementCollectionItem();
+ XmlProjectElementCollectionItem *xpeci = new XmlProjectElementCollectionItem();
appendRow(xpeci);
xpeci->setXmlElement(element, m_project, set_data);
if (set_data)
Modified: trunk/sources/QPropertyUndoCommand/qpropertyundocommand.cpp
===================================================================
--- trunk/sources/QPropertyUndoCommand/qpropertyundocommand.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/QPropertyUndoCommand/qpropertyundocommand.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -100,7 +100,7 @@
bool QPropertyUndoCommand::mergeWith(const QUndoCommand *other)
{
if (id() != other->id() || other->childCount()) return false;
- auto const *undo = static_cast<const QPropertyUndoCommand *>(other);
+ QPropertyUndoCommand const *undo = static_cast<const QPropertyUndoCommand *>(other);
if (m_object != undo->m_object || m_property_name != undo->m_property_name) return false;
m_new_value = undo->m_new_value;
return true;
Modified: trunk/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp
===================================================================
--- trunk/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -82,7 +82,7 @@
QVector <QetGraphicsHandlerItem *> list_;
for (QPointF point : points)
{
- auto *qghi = new QetGraphicsHandlerItem(size);
+ QetGraphicsHandlerItem *qghi = new QetGraphicsHandlerItem(size);
qghi->setPos(point);
list_ << qghi;
}
Modified: trunk/sources/aboutqet.cpp
===================================================================
--- trunk/sources/aboutqet.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/aboutqet.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -40,7 +40,7 @@
setModal(true);
- auto *tabs = new QTabWidget();
+ QTabWidget *tabs = new QTabWidget();
tabs -> addTab(aboutTab(), tr("À &propos", "tab title"));
tabs -> addTab(authorsTab(), tr("A&uteurs", "tab title"));
tabs -> addTab(translatorsTab(), tr("&Traducteurs", "tab title"));
@@ -52,11 +52,11 @@
connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttons, SIGNAL(rejected()), this, SLOT(accept()));
- auto *vlayout = new QVBoxLayout(this);
+ QVBoxLayout *vlayout = new QVBoxLayout(this);
vlayout->addWidget(tabs);
vlayout->addWidget(buttons);
- auto* scrollArea = new QScrollArea(this);
+ QScrollArea* scrollArea = new QScrollArea(this);
scrollArea->setWidgetResizable(true);
scrollArea->setFixedSize (590, 590);
scrollArea->setWidget(tabs);
@@ -135,7 +135,7 @@
authors -> setTextFormat(Qt::RichText);
QWidget *authors_widget = new QWidget();
- auto *authors_layout = new QHBoxLayout(authors_widget);
+ QHBoxLayout *authors_layout = new QHBoxLayout(authors_widget);
authors_layout -> addWidget(authors, 0, Qt::AlignCenter);
return(authors_widget);
}
@@ -175,7 +175,7 @@
translators -> setTextFormat(Qt::RichText);
QWidget *translators_widget = new QWidget();
- auto *translators_layout = new QHBoxLayout(translators_widget);
+ QHBoxLayout *translators_layout = new QHBoxLayout(translators_widget);
translators_layout -> addWidget(translators, 0, Qt::AlignCenter);
return(translators_widget);
}
@@ -207,7 +207,7 @@
contributors -> setTextFormat(Qt::RichText);
QWidget *contributors_widget = new QWidget();
- auto *contributors_layout = new QHBoxLayout(contributors_widget);
+ QHBoxLayout *contributors_layout = new QHBoxLayout(contributors_widget);
contributors_layout -> addWidget(contributors, 0, Qt::AlignCenter);
return(contributors_widget);
}
@@ -221,12 +221,12 @@
QLabel *title_license = new QLabel(tr("Ce programme est sous licence GNU/GPL."));
// Text of the GNU/GPL in a scrollable text box not editable
- auto *text_license = new QTextEdit();
+ QTextEdit *text_license = new QTextEdit();
text_license -> setPlainText(QET::license());
text_license -> setReadOnly(true);
// All in a vertical arrangement
- auto *license_layout = new QVBoxLayout();
+ QVBoxLayout *license_layout = new QVBoxLayout();
license_layout -> addWidget(title_license);
license_layout -> addWidget(text_license);
license -> setLayout(license_layout);
Modified: trunk/sources/autoNum/ui/selectautonumw.cpp
===================================================================
--- trunk/sources/autoNum/ui/selectautonumw.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/autoNum/ui/selectautonumw.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -94,7 +94,7 @@
}
else {
for (int i=0; i<m_context.size(); ++i) { //build with the content of @context
- auto *part= new NumPartEditorW(m_context, i, m_edited_type, this);
+ NumPartEditorW *part= new NumPartEditorW(m_context, i, m_edited_type, this);
connect (part, SIGNAL(changed()), this, SLOT(applyEnable()));
num_part_list_ << part;
ui -> editor_layout -> addWidget(part);
@@ -125,7 +125,7 @@
void SelectAutonumW::on_add_button_clicked()
{
applyEnable(false);
- auto *part = new NumPartEditorW(m_edited_type, this);
+ NumPartEditorW *part = new NumPartEditorW(m_edited_type, this);
connect (part, SIGNAL(changed()), this, SLOT(applyEnable()));
num_part_list_ << part;
ui -> editor_layout -> addWidget(part);
Modified: trunk/sources/bordertitleblock.cpp
===================================================================
--- trunk/sources/bordertitleblock.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/bordertitleblock.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -673,8 +673,8 @@
return (DiagramPosition("", 0));
QPointF relative_pos = pos - insideBorderRect().topLeft();
- auto row_number = int(ceil(relative_pos.x() / columnsWidth()));
- auto column_number = int(ceil(relative_pos.y() / rowsHeight()));
+ int row_number = int(ceil(relative_pos.x() / columnsWidth()));
+ int column_number = int(ceil(relative_pos.y() / rowsHeight()));
QString letter = "A";
for (int i = 1 ; i < column_number ; ++ i)
Modified: trunk/sources/configdialog.cpp
===================================================================
--- trunk/sources/configdialog.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/configdialog.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -41,11 +41,11 @@
buttons = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
// layouts
- auto *hlayout1 = new QHBoxLayout();
+ QHBoxLayout *hlayout1 = new QHBoxLayout();
hlayout1 -> addWidget(pages_list);
hlayout1 -> addWidget(pages_widget);
- auto *vlayout1 = new QVBoxLayout();
+ QVBoxLayout *vlayout1 = new QVBoxLayout();
vlayout1 -> addLayout(hlayout1);
vlayout1 -> addWidget(buttons);
setLayout(vlayout1);
@@ -80,7 +80,7 @@
Add the \a page ConfigPage to this configuration dialog.
*/
void ConfigDialog::addPageToList(ConfigPage *page) {
- auto *new_button = new QListWidgetItem(pages_list);
+ QListWidgetItem *new_button = new QListWidgetItem(pages_list);
new_button -> setIcon(page -> icon());
new_button -> setText(page -> title());
new_button -> setTextAlignment(Qt::AlignHCenter);
Modified: trunk/sources/configpages.cpp
===================================================================
--- trunk/sources/configpages.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/configpages.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -73,9 +73,9 @@
connect(ipw,SIGNAL(openAutoNumFolioEditor(QString)),this,SLOT(changeToAutoFolioTab()));
// main tab widget
- auto *tab_widget = new QTabWidget(this);
+ QTabWidget *tab_widget = new QTabWidget(this);
QWidget *diagram_widget = new QWidget();
- auto *diagram_layout = new QVBoxLayout(diagram_widget);
+ QVBoxLayout *diagram_layout = new QVBoxLayout(diagram_widget);
diagram_layout -> addWidget(bpw);
diagram_layout -> addWidget(ipw);
@@ -85,7 +85,7 @@
tab_widget -> addTab (rpw, tr("Reports de folio"));
tab_widget -> addTab (xrefpw, tr("Références croisées"));
- auto *vlayout1 = new QVBoxLayout();
+ QVBoxLayout *vlayout1 = new QVBoxLayout();
vlayout1->addWidget(tab_widget);
setLayout(vlayout1);
@@ -235,7 +235,7 @@
epw = new ExportPropertiesWidget(ExportProperties::defaultExportProperties());
// layout vertical contenant le titre, une ligne horizontale et epw
- auto *vlayout1 = new QVBoxLayout();
+ QVBoxLayout *vlayout1 = new QVBoxLayout();
QLabel *title = new QLabel(this -> title());
vlayout1 -> addWidget(title);
@@ -283,7 +283,7 @@
epw -> setPrintingMode(true);
// layout vertical contenant le titre, une ligne horizontale et epw
- auto *vlayout1 = new QVBoxLayout();
+ QVBoxLayout *vlayout1 = new QVBoxLayout();
QLabel *title = new QLabel(this -> title());
vlayout1 -> addWidget(title);
Modified: trunk/sources/createdxf.cpp
===================================================================
--- trunk/sources/createdxf.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/createdxf.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -36,13 +36,13 @@
Createdxf::~Createdxf()
{
-}
-
-/* Header section of every DXF file.*/
-void Createdxf::dxfBegin (const QString& fileName)
-{
-
- // Creation of an output stream object in text mode.
+}
+
+/* Header section of every DXF file.*/
+void Createdxf::dxfBegin (const QString& fileName)
+{
+
+ // Creation of an output stream object in text mode.
// Header section of every dxf file.
if (!fileName.isEmpty()) {
QFile file(fileName);
@@ -226,13 +226,13 @@
file.close();
}
}
-}
-
-/* End Section of every DXF File*/
-void Createdxf::dxfEnd (const QString& fileName)
-{
- // Creation of an output stream object in text mode.
- if (!fileName.isEmpty()) {
+}
+
+/* End Section of every DXF File*/
+void Createdxf::dxfEnd (const QString& fileName)
+{
+ // Creation of an output stream object in text mode.
+ if (!fileName.isEmpty()) {
QFile file(fileName);
if (!file.open(QFile::Append)) {
// error message
@@ -250,13 +250,13 @@
}
}
}
-
-
-/* draw circle in dxf format*/
-void Createdxf::drawCircle (const QString& fileName, double radius, double x, double y, int colour)
-{
- if (!fileName.isEmpty()) {
- QFile file(fileName);
+
+
+/* draw circle in dxf format*/
+void Createdxf::drawCircle (const QString& fileName, double radius, double x, double y, int colour)
+{
+ if (!fileName.isEmpty()) {
+ QFile file(fileName);
if (!file.open(QFile::Append)) {
// error message
QMessageBox errorFileOpen;
@@ -665,13 +665,13 @@
rect.width() * xScale,
rect.height() * yScale,
colorcode);
-}
-
-/* draw arc in dx format */
-void Createdxf::drawArc(const QString& fileName,double x,double y,double rad,double startAngle,double endAngle,int color)
-{
- if (!fileName.isEmpty()) {
- QFile file(fileName);
+}
+
+/* draw arc in dx format */
+void Createdxf::drawArc(const QString& fileName,double x,double y,double rad,double startAngle,double endAngle,int color)
+{
+ if (!fileName.isEmpty()) {
+ QFile file(fileName);
if (!file.open(QFile::Append)) {
// error message
QMessageBox errorFileOpen;
@@ -702,13 +702,13 @@
file.close();
}
}
-}
-
-/* draw simple text in dxf format without any alignment specified */
-void Createdxf::drawText(const QString& fileName, const QString& text,double x, double y, double height, double rotation, int colour)
-{
- if (!fileName.isEmpty()) {
- QFile file(fileName);
+}
+
+/* draw simple text in dxf format without any alignment specified */
+void Createdxf::drawText(const QString& fileName, const QString& text,double x, double y, double height, double rotation, int colour)
+{
+ if (!fileName.isEmpty()) {
+ QFile file(fileName);
if (!file.open(QFile::Append)) {
// error message
QMessageBox errorFileOpen;
@@ -741,13 +741,13 @@
}
}
-/* draw aligned text in DXF Format */
-// leftAlign flag added. If the alignment requested is 'fit to width' and the text length is very small,
-// then the text is either centered or left-aligned, depnding on the value of leftAlign.
-void Createdxf::drawTextAligned(const QString& fileName, const QString& text,double x, double y, double height, double rotation, double oblique,int hAlign, int vAlign, double xAlign,int colour,
- bool leftAlign, float scale)
-{
- Q_UNUSED(scale);
+/* draw aligned text in DXF Format */
+// leftAlign flag added. If the alignment requested is 'fit to width' and the text length is very small,
+// then the text is either centered or left-aligned, depnding on the value of leftAlign.
+void Createdxf::drawTextAligned(const QString& fileName, const QString& text,double x, double y, double height, double rotation, double oblique,int hAlign, int vAlign, double xAlign,int colour,
+ bool leftAlign, float scale)
+{
+ Q_UNUSED(scale);
if (!fileName.isEmpty()) {
QFile file(fileName);
Modified: trunk/sources/createdxf.h
===================================================================
--- trunk/sources/createdxf.h 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/createdxf.h 2018-07-30 15:24:29 UTC (rev 5461)
@@ -25,31 +25,31 @@
/* This class exports the project to DXF Format */
class Createdxf
{
- public:
- Createdxf();
- ~Createdxf();
- static void dxfBegin (const QString&);
- static void dxfEnd(const QString&);
- // you can add more functions to create more drawings.
- static void drawCircle(const QString&,double,double,double,int);
- static void drawArc(const QString&,double x,double y,double rad,double startAngle,double endAngle,int color);
- static void drawDonut(QString,double,double,double,int);
+ public:
+ Createdxf();
+ ~Createdxf();
+ static void dxfBegin (const QString&);
+ static void dxfEnd(const QString&);
+ // you can add more functions to create more drawings.
+ static void drawCircle(const QString&,double,double,double,int);
+ static void drawArc(const QString&,double x,double y,double rad,double startAngle,double endAngle,int color);
+ static void drawDonut(QString,double,double,double,int);
+
+ static void drawArcEllipse (const QString &file_path, qreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal spanAngle, qreal hotspot_x, qreal hotspot_y, qreal rotation_angle, const int &colorcode);
- static void drawArcEllipse (const QString &file_path, qreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal spanAngle, qreal hotspot_x, qreal hotspot_y, qreal rotation_angle, const int &colorcode);
-
static void drawEllipse (const QString &filepath, const QRectF &rect, const int &colorcode);
static void drawRectangle(const QString &filepath,double,double,double,double,const int &colorcode);
static void drawRectangle(const QString &filepath, const QRectF &rect, const int &colorcode);
- static void drawLine(const QString &filapath,double,double,double,double, const int &clorcode);
- static void drawLine(const QString &filepath, const QLineF &line,const int &colorcode);
-
- static void drawText(const QString&,const QString&,double,double,double,double,int);
- static void drawTextAligned(const QString& fileName, const QString& text,double x, double y, double height, double rotation, double oblique,int hAlign, int vAlign, double xAlign, int colour, bool leftAlign = false, float scale = 0);
-
-
- static int getcolorCode (const long red, const long green, const long blue);
+ static void drawLine(const QString &filapath,double,double,double,double, const int &clorcode);
+ static void drawLine(const QString &filepath, const QLineF &line,const int &colorcode);
+
+ static void drawText(const QString&,const QString&,double,double,double,double,int);
+ static void drawTextAligned(const QString& fileName, const QString& text,double x, double y, double height, double rotation, double oblique,int hAlign, int vAlign, double xAlign, int colour, bool leftAlign = false, float scale = 0);
+
+
+ static int getcolorCode (const long red, const long green, const long blue);
static long RGBcodeTable[];
static const double sheetWidth;
Modified: trunk/sources/diagram.cpp
===================================================================
--- trunk/sources/diagram.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/diagram.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -159,9 +159,9 @@
qreal limite_x = rect.x() + rect.width();
qreal limite_y = rect.y() + rect.height();
- auto g_x = (int)ceil(rect.x());
+ int g_x = (int)ceil(rect.x());
while (g_x % xGrid) ++ g_x;
- auto g_y = (int)ceil(rect.y());
+ int g_y = (int)ceil(rect.y());
while (g_y % yGrid) ++ g_y;
QPolygon points;
@@ -649,10 +649,10 @@
;
// Determine les elements a "XMLiser"
foreach(QGraphicsItem *qgi, list_items) {
- if (auto *elmt = qgraphicsitem_cast<Element *>(qgi)) {
+ if (Element *elmt = qgraphicsitem_cast<Element *>(qgi)) {
if (whole_content) list_elements << elmt;
else if (elmt -> isSelected()) list_elements << elmt;
- } else if (auto *f = qgraphicsitem_cast<Conductor *>(qgi)) {
+ } else if (Conductor *f = qgraphicsitem_cast<Conductor *>(qgi)) {
if (whole_content) list_conductors << f;
// lorsqu'on n'exporte pas tout le diagram, il faut retirer les conducteurs non selectionnes
// et pour l'instant, les conducteurs non selectionnes sont les conducteurs dont un des elements n'est pas selectionne
@@ -659,13 +659,13 @@
else if (f -> terminal1 -> parentItem() -> isSelected() && f -> terminal2 -> parentItem() -> isSelected()) {
list_conductors << f;
}
- } else if (auto *iti = qgraphicsitem_cast<IndependentTextItem *>(qgi)) {
+ } else if (IndependentTextItem *iti = qgraphicsitem_cast<IndependentTextItem *>(qgi)) {
if (whole_content) list_texts << iti;
else if (iti -> isSelected()) list_texts << iti;
- } else if (auto *dii = qgraphicsitem_cast<DiagramImageItem *>(qgi)) {
+ } else if (DiagramImageItem *dii = qgraphicsitem_cast<DiagramImageItem *>(qgi)) {
if (whole_content) list_images << dii;
else if (dii -> isSelected()) list_images << dii;
- } else if (auto *dsi = qgraphicsitem_cast<QetShapeItem *>(qgi)) {
+ } else if (QetShapeItem *dsi = qgraphicsitem_cast<QetShapeItem *>(qgi)) {
if (whole_content) list_shapes << dsi;
else if (dsi -> isSelected()) list_shapes << dsi;
}
@@ -920,7 +920,7 @@
// Load text
QList<IndependentTextItem *> added_texts;
foreach (QDomElement text_xml, QET::findInDomElement(root, "inputs", "input")) {
- auto *iti = new IndependentTextItem();
+ IndependentTextItem *iti = new IndependentTextItem();
iti -> fromXml(text_xml);
addItem(iti);
added_texts << iti;
@@ -929,7 +929,7 @@
// Load image
QList<DiagramImageItem *> added_images;
foreach (QDomElement image_xml, QET::findInDomElement(root, "images", "image")) {
- auto *dii = new DiagramImageItem ();
+ DiagramImageItem *dii = new DiagramImageItem ();
dii -> fromXml(image_xml);
addItem(dii);
added_images << dii;
@@ -959,7 +959,7 @@
Terminal *p2 = table_adr_id.value(id_p2);
if (p1 != p2)
{
- auto *c = new Conductor(p1, p2);
+ Conductor *c = new Conductor(p1, p2);
if (c->isValid())
{
addItem(c);
@@ -1069,7 +1069,7 @@
{
case Conductor::Type:
{
- auto *conductor = static_cast<Conductor *>(item);
+ Conductor *conductor = static_cast<Conductor *>(item);
conductor->terminal1->addConductor(conductor);
conductor->terminal2->addConductor(conductor);
conductor->calculateTextItemPosition();
@@ -1078,7 +1078,7 @@
case IndependentTextItem::Type:
{
- const auto *text = static_cast<const IndependentTextItem *>(item);
+ const IndependentTextItem *text = static_cast<const IndependentTextItem *>(item);
connect(text, &IndependentTextItem::diagramTextChanged, this, &Diagram::diagramTextChanged);
}
}
@@ -1098,13 +1098,13 @@
{
case Element::Type:
{
- auto *elmt = static_cast<Element*>(item);
+ Element *elmt = static_cast<Element*>(item);
elmt->unlinkAllElements();
}
break;
case Conductor::Type:
{
- auto *conductor = static_cast<Conductor *>(item);
+ Conductor *conductor = static_cast<Conductor *>(item);
conductor->terminal1->removeConductor(conductor);
conductor->terminal2->removeConductor(conductor);
}
@@ -1112,7 +1112,7 @@
case IndependentTextItem::Type:
{
- const auto *text = static_cast<const IndependentTextItem *>(item);
+ const IndependentTextItem *text = static_cast<const IndependentTextItem *>(item);
disconnect(text, &IndependentTextItem::diagramTextChanged, this, &Diagram::diagramTextChanged);
}
}
@@ -1456,7 +1456,7 @@
QList<CustomElement *> Diagram::customElements() const {
QList<CustomElement *> elements_list;
foreach(QGraphicsItem *qgi, items()) {
- if (auto *elmt = qgraphicsitem_cast<CustomElement *>(qgi)) {
+ if (CustomElement *elmt = qgraphicsitem_cast<CustomElement *>(qgi)) {
elements_list << elmt;
}
}
@@ -1466,7 +1466,7 @@
QList <Element *> Diagram::elements() const {
QList<Element *> element_list;
foreach (QGraphicsItem *qgi, items()) {
- if (auto *elmt = qgraphicsitem_cast<Element *>(qgi))
+ if (Element *elmt = qgraphicsitem_cast<Element *>(qgi))
element_list <<elmt;
}
return (element_list);
@@ -1479,7 +1479,7 @@
QList <Conductor *> Diagram::conductors() const {
QList<Conductor *> cnd_list;
foreach (QGraphicsItem *qgi, items()) {
- if (auto *cnd = qgraphicsitem_cast<Conductor *>(qgi))
+ if (Conductor *cnd = qgraphicsitem_cast<Conductor *>(qgi))
cnd_list <<cnd;
}
return (cnd_list);
@@ -1662,7 +1662,7 @@
*/
void Diagram::setDrawTerminals(bool dt) {
foreach(QGraphicsItem *qgi, items()) {
- if (auto *t = qgraphicsitem_cast<Terminal *>(qgi)) {
+ if (Terminal *t = qgraphicsitem_cast<Terminal *>(qgi)) {
t -> setVisible(dt);
}
}
@@ -1683,7 +1683,7 @@
QSet<Conductor *> Diagram::selectedConductors() const {
QSet<Conductor *> conductors_set;
foreach(QGraphicsItem *qgi, selectedItems()) {
- if (auto *c = qgraphicsitem_cast<Conductor *>(qgi)) {
+ if (Conductor *c = qgraphicsitem_cast<Conductor *>(qgi)) {
conductors_set << c;
}
}
@@ -1761,11 +1761,11 @@
DiagramContent Diagram::content() const {
DiagramContent dc;
foreach(QGraphicsItem *qgi, items()) {
- if (auto *e = qgraphicsitem_cast<Element *>(qgi)) {
+ if (Element *e = qgraphicsitem_cast<Element *>(qgi)) {
dc.m_elements << e;
- } else if (auto *iti = qgraphicsitem_cast<IndependentTextItem *>(qgi)) {
+ } else if (IndependentTextItem *iti = qgraphicsitem_cast<IndependentTextItem *>(qgi)) {
dc.m_text_fields << iti;
- } else if (auto *c = qgraphicsitem_cast<Conductor *>(qgi)) {
+ } else if (Conductor *c = qgraphicsitem_cast<Conductor *>(qgi)) {
dc.m_conductors_to_move << c;
}
}
Modified: trunk/sources/diagramcommands.cpp
===================================================================
--- trunk/sources/diagramcommands.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/diagramcommands.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -260,7 +260,7 @@
setupAnimation(qgi->toGraphicsObject(), "pos", qgi->pos(), qgi->pos() + actual_movement);
else if(qgi->type() == QGraphicsItemGroup::Type) //ElementTextItemGroup is a QObject but not a QGraphicsObject
{
- if(auto *etig = dynamic_cast<ElementTextItemGroup *>(qgi))
+ if(ElementTextItemGroup *etig = dynamic_cast<ElementTextItemGroup *>(qgi))
setupAnimation(etig, "pos", etig->pos(), etig->pos() + actual_movement);
}
else qgi -> setPos(qgi->pos() + actual_movement);
@@ -286,7 +286,7 @@
void MoveElementsCommand::setupAnimation(QObject *target, const QByteArray &propertyName, const QVariant& start, const QVariant& end) {
//create animation group if not yet.
if (m_anim_group == nullptr) m_anim_group = new QParallelAnimationGroup();
- auto *animation = new QPropertyAnimation(target, propertyName);
+ QPropertyAnimation *animation = new QPropertyAnimation(target, propertyName);
animation->setDuration(300);
animation->setStartValue(start);
animation->setEndValue(end);
Modified: trunk/sources/diagramcontent.cpp
===================================================================
--- trunk/sources/diagramcontent.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/diagramcontent.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -44,11 +44,11 @@
//Get the selected items
for (QGraphicsItem *item : m_selected_items)
{
- if (auto *elmt = qgraphicsitem_cast<Element *>(item))
+ if (Element *elmt = qgraphicsitem_cast<Element *>(item))
m_elements << elmt;
- else if (auto *iti = qgraphicsitem_cast<IndependentTextItem *>(item))
+ else if (IndependentTextItem *iti = qgraphicsitem_cast<IndependentTextItem *>(item))
m_text_fields << iti;
- else if (auto *c = qgraphicsitem_cast<Conductor *>(item))
+ else if (Conductor *c = qgraphicsitem_cast<Conductor *>(item))
{
//Get the isolated selected conductor (= not movable, but deletable)
if (!c->terminal1->parentItem()->isSelected() &&\
@@ -56,14 +56,14 @@
m_other_conductors << c;
}
}
- else if (auto *dii = qgraphicsitem_cast<DiagramImageItem *>(item))
+ else if (DiagramImageItem *dii = qgraphicsitem_cast<DiagramImageItem *>(item))
m_images << dii;
- else if (auto *dsi = qgraphicsitem_cast<QetShapeItem *>(item))
+ else if (QetShapeItem *dsi = qgraphicsitem_cast<QetShapeItem *>(item))
m_shapes << dsi;
- else if (auto *deti = qgraphicsitem_cast<DynamicElementTextItem *>(item))
+ else if (DynamicElementTextItem *deti = qgraphicsitem_cast<DynamicElementTextItem *>(item))
m_element_texts << deti;
- else if (auto *group = qgraphicsitem_cast<QGraphicsItemGroup *>(item))
- if(auto *etig = dynamic_cast<ElementTextItemGroup *>(group))
+ else if (QGraphicsItemGroup *group = qgraphicsitem_cast<QGraphicsItemGroup *>(item))
+ if(ElementTextItemGroup *etig = dynamic_cast<ElementTextItemGroup *>(group))
m_texts_groups << etig;
}
@@ -147,7 +147,7 @@
for(QGraphicsItem *qgi : m_selected_items)
if(qgi->type() == QGraphicsItemGroup::Type)
- if(auto *grp = dynamic_cast<ElementTextItemGroup *>(qgi))
+ if(ElementTextItemGroup *grp = dynamic_cast<ElementTextItemGroup *>(qgi))
groups << grp;
return groups;
Modified: trunk/sources/diagramcontextwidget.cpp
===================================================================
--- trunk/sources/diagramcontextwidget.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/diagramcontextwidget.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -183,7 +183,7 @@
Initialize the layout of this widget.
*/
void DiagramContextWidget::initLayout() {
- auto *vlayout0 = new QVBoxLayout();
+ QVBoxLayout *vlayout0 = new QVBoxLayout();
vlayout0 -> setContentsMargins(0, 0, 0, 0);
vlayout0 -> addWidget(format_label);
vlayout0 -> addWidget(table_);
Modified: trunk/sources/diagramevent/diagrameventaddelement.cpp
===================================================================
--- trunk/sources/diagramevent/diagrameventaddelement.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/diagramevent/diagrameventaddelement.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -230,7 +230,7 @@
{
QPair <Terminal *, Terminal *> pair = element -> AlignedFreeTerminals().takeFirst();
- auto *conductor = new Conductor(pair.first, pair.second);
+ Conductor *conductor = new Conductor(pair.first, pair.second);
new AddItemCommand<Conductor *>(conductor, m_diagram, QPointF(), undo_object);
//Autonum the new conductor, the undo command associated for this, have for parent undo_object
Modified: trunk/sources/diagramevent/diagrameventaddtext.cpp
===================================================================
--- trunk/sources/diagramevent/diagrameventaddtext.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/diagramevent/diagrameventaddtext.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -45,7 +45,7 @@
{
if (event->button() == Qt::LeftButton)
{
- auto *text = new IndependentTextItem();
+ IndependentTextItem *text = new IndependentTextItem();
m_diagram -> undoStack().push(new AddItemCommand<IndependentTextItem *>(text, m_diagram, event->scenePos()));
text->setTextInteractionFlags(Qt::TextEditorInteraction);
text->setFocus(Qt::MouseFocusReason);
Modified: trunk/sources/diagramfoliolist.cpp
===================================================================
--- trunk/sources/diagramfoliolist.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/diagramfoliolist.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -236,16 +236,16 @@
qreal y0 = tablesSpacing + rect.topLeft().y();
for (int i = 0; i < tables; ++i) {
- auto *tableRect = new QRectF(x0, y0, tableWidth, rect.height() - 2*tablesSpacing);
+ QRectF *tableRect = new QRectF(x0, y0, tableWidth, rect.height() - 2*tablesSpacing);
qp->drawRect(*tableRect);
list_rectangles_.push_back(tableRect);
for (int j = 1; j < rows; ++j) {
- auto *line = new QLineF(x0, y0 + j*rowHeight, x0 + tableWidth,y0 + j*rowHeight);
+ QLineF *line = new QLineF(x0, y0 + j*rowHeight, x0 + tableWidth,y0 + j*rowHeight);
qp->drawLine(*line);
list_lines_.push_back(line);
}
for (int j = 0; j < cols-1; ++j) {
- auto *line = new QLineF(x0 + colWidths[j]*tableWidth, y0, x0 + colWidths[j]*tableWidth,y0 + rows*rowHeight);
+ QLineF *line = new QLineF(x0 + colWidths[j]*tableWidth, y0, x0 + colWidths[j]*tableWidth,y0 + rows*rowHeight);
qp->drawLine(*line);
list_lines_.push_back(line);
x0 += colWidths[j]*tableWidth;
Modified: trunk/sources/diagramprintdialog.cpp
===================================================================
--- trunk/sources/diagramprintdialog.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/diagramprintdialog.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -187,7 +187,7 @@
QRect printable_area = fullpage ? printer_ -> paperRect() : printer_ -> pageRect();
QRect diagram_rect = diagramRect(diagram, options);
- auto h_pages_count = int(ceil(qreal(diagram_rect.width()) / qreal(printable_area.width())));
+ int h_pages_count = int(ceil(qreal(diagram_rect.width()) / qreal(printable_area.width())));
return(h_pages_count);
}
@@ -203,7 +203,7 @@
QRect printable_area = fullpage ? printer_ -> paperRect() : printer_ -> pageRect();
QRect diagram_rect = diagramRect(diagram, options);
- auto v_pages_count = int(ceil(qreal(diagram_rect.height()) / qreal(printable_area.height())));
+ int v_pages_count = int(ceil(qreal(diagram_rect.height()) / qreal(printable_area.height())));
return(v_pages_count);
}
Modified: trunk/sources/diagramschooser.cpp
===================================================================
--- trunk/sources/diagramschooser.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/diagramschooser.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -164,7 +164,7 @@
QString diagram_title = diagram -> title();
if (diagram_title.isEmpty()) diagram_title = tr("Folio sans titre");
- auto *checkbox = new QCheckBox(diagram_title);
+ QCheckBox *checkbox = new QCheckBox(diagram_title);
checkbox -> setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum));
checkbox -> setChecked(selected_diagrams.contains(diagram));
connect(checkbox, SIGNAL(toggled(bool)), this, SIGNAL(selectionChanged()));
Modified: trunk/sources/diagramview.cpp
===================================================================
--- trunk/sources/diagramview.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/diagramview.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -227,7 +227,7 @@
QString integrated_template_name = tbt_loc.name();
if (mustIntegrateTitleBlockTemplate(tbt_loc))
{
- auto *handler = new IntegrationMoveTitleBlockTemplatesHandler(this);
+ IntegrationMoveTitleBlockTemplatesHandler *handler = new IntegrationMoveTitleBlockTemplatesHandler(this);
//QString error_message;
integrated_template_name = m_diagram->project()->integrateTitleBlockTemplate(tbt_loc, handler);
@@ -507,7 +507,7 @@
{
if (QGesture *gesture = event->gesture(Qt::PinchGesture))
{
- auto *pinch = static_cast<QPinchGesture *>(gesture);
+ QPinchGesture *pinch = static_cast<QPinchGesture *>(gesture);
if (pinch->changeFlags() & QPinchGesture::ScaleFactorChanged)
{
qreal value = gesture->property("scaleFactor").toReal();
@@ -831,7 +831,7 @@
ConductorProperties initial_properties = edited_conductor -> properties();
// prepare a color dialog showing the initial conductor color
- auto *color_dialog = new QColorDialog(this);
+ QColorDialog *color_dialog = new QColorDialog(this);
color_dialog -> setWindowTitle(tr("Choisir la nouvelle couleur de ce conducteur"));
#ifdef Q_OS_MAC
color_dialog -> setWindowFlags(Qt::Sheet);
@@ -850,7 +850,7 @@
initial_properties.color = new_color;
new_value.setValue(initial_properties);
- auto *undo = new QPropertyUndoCommand(edited_conductor, "properties", old_value, new_value);
+ QPropertyUndoCommand *undo = new QPropertyUndoCommand(edited_conductor, "properties", old_value, new_value);
undo->setText(tr("Modifier les propriétés d'un conducteur", "undo caption"));
diagram() -> undoStack().push(undo);
}
@@ -958,11 +958,11 @@
// note: QInputEvent::modifiers and QKeyEvent::modifiers() do not return the
// same values, hence the casts
if (e -> type() == QEvent::KeyPress || e -> type() == QEvent::KeyRelease) {
- if (auto *ke = static_cast<QKeyEvent *>(e)) {
+ if (QKeyEvent *ke = static_cast<QKeyEvent *>(e)) {
result = (ke -> modifiers() == (Qt::ControlModifier | Qt::ShiftModifier));
}
} else if (e -> type() >= QEvent::MouseButtonPress && e -> type() <= QEvent::MouseMove) {
- if (auto *me = static_cast<QMouseEvent *>(e)) {
+ if (QMouseEvent *me = static_cast<QMouseEvent *>(e)) {
result = (me -> modifiers() == (Qt::ControlModifier | Qt::ShiftModifier));
}
}
@@ -992,11 +992,11 @@
//We use dynamic_cast instead of qgraphicsitem_cast for QetGraphicsItem
//because they haven't got they own type().
//Use qgraphicsitem_cast will have weird behavior for this class.
- if (auto *iti = qgraphicsitem_cast<IndependentTextItem *>(item))
+ if (IndependentTextItem *iti = qgraphicsitem_cast<IndependentTextItem *>(item))
iti -> edit();
- else if (auto *qgi = dynamic_cast<QetGraphicsItem *> (item))
+ else if (QetGraphicsItem *qgi = dynamic_cast<QetGraphicsItem *> (item))
qgi -> editProperty();
- else if (auto *c = qgraphicsitem_cast<Conductor *>(item))
+ else if (Conductor *c = qgraphicsitem_cast<Conductor *>(item))
c -> editProperty();
}
@@ -1084,7 +1084,7 @@
QList <QAction *> list = contextMenuActions();
if(!list.isEmpty())
{
- auto *context_menu = new QMenu(this);
+ QMenu *context_menu = new QMenu(this);
context_menu->addActions(list);
context_menu->popup(e->globalPos());
e->accept();
Modified: trunk/sources/editor/arceditor.cpp
===================================================================
--- trunk/sources/editor/arceditor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/arceditor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -47,9 +47,9 @@
h->setRange(-5000, 5000);
v->setRange(-5000, 5000);
- auto *v_layout = new QVBoxLayout(this);
+ QVBoxLayout *v_layout = new QVBoxLayout(this);
- auto *grid = new QGridLayout();
+ QGridLayout *grid = new QGridLayout();
grid -> addWidget(new QLabel(tr("Centre : ")), 0, 0);
grid -> addWidget(new QLabel("x"), 1, 0, Qt::AlignRight);
grid -> addWidget(x, 1, 1);
@@ -99,7 +99,7 @@
return(true);
}
- if (auto *part_arc = dynamic_cast<PartArc *>(new_part))
+ if (PartArc *part_arc = dynamic_cast<PartArc *>(new_part))
{
if (part == part_arc) return true;
if (part)
Modified: trunk/sources/editor/elementprimitivedecorator.cpp
===================================================================
--- trunk/sources/editor/elementprimitivedecorator.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/elementprimitivedecorator.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -122,7 +122,7 @@
QList<CustomElementPart *> primitives;
for(QGraphicsItem *item : items)
{
- if (auto *part_item = dynamic_cast<CustomElementPart *>(item))
+ if (CustomElementPart *part_item = dynamic_cast<CustomElementPart *>(item))
{
primitives << part_item;
}
@@ -143,7 +143,7 @@
QList<QGraphicsItem *> ElementPrimitiveDecorator::graphicsItems() const {
QList<QGraphicsItem *> list;
foreach (CustomElementPart *part_item, decorated_items_) {
- if (auto *item = dynamic_cast<QGraphicsItem *>(part_item)) {
+ if (QGraphicsItem *item = dynamic_cast<QGraphicsItem *>(part_item)) {
list << item;
}
}
@@ -555,7 +555,7 @@
ElementEditionCommand *command = nullptr;
if (current_operation_square_ > QET::NoOperation)
{
- auto *scale_command = new ScalePartsCommand();
+ ScalePartsCommand *scale_command = new ScalePartsCommand();
scale_command -> setScaledPrimitives(items());
scale_command -> setTransformation(
mapToScene(original_bounding_rect_).boundingRect(),
@@ -717,7 +717,7 @@
//Watched must be an handler
if(watched->type() == QetGraphicsHandlerItem::Type)
{
- auto *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
+ QetGraphicsHandlerItem *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
if(m_handler_vector.contains(qghi)) //Handler must be in m_vector_index, then we can start resize
{
Modified: trunk/sources/editor/elementscene.cpp
===================================================================
--- trunk/sources/editor/elementscene.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/elementscene.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -416,7 +416,7 @@
{
//If the export concerns only the selection, the not selected part is ignored
if (!all_parts && !qgi -> isSelected()) continue;
- if (auto *ce = dynamic_cast<CustomElementPart *>(qgi))
+ if (CustomElementPart *ce = dynamic_cast<CustomElementPart *>(qgi))
{
if (ce -> isUseless()) continue;
description.appendChild(ce -> toXml(xml_document));
@@ -492,7 +492,7 @@
if (qgi->type() == ElementPrimitiveDecorator::Type) continue;
if (qgi->type() == QGraphicsRectItem::Type) continue;
if (qgi->type() == PartDynamicTextField::Type) continue;
- if (auto *cep = dynamic_cast <CustomElementPart*> (qgi)) {
+ if (CustomElementPart *cep = dynamic_cast <CustomElementPart*> (qgi)) {
esgr |= cep -> sceneGeometricRect();
}
}
@@ -675,7 +675,7 @@
#endif
dialog_author.setMinimumSize(400, 260);
dialog_author.setWindowTitle(tr("Éditer les informations sur l'auteur", "window title"));
- auto *dialog_layout = new QVBoxLayout(&dialog_author);
+ QVBoxLayout *dialog_layout = new QVBoxLayout(&dialog_author);
// ajoute un champ explicatif au dialogue
QLabel *information_label = new QLabel(tr("Vous pouvez utiliser ce champ libre pour mentionner les auteurs de l'élément, sa licence, ou tout autre renseignement que vous jugerez utile."));
@@ -684,7 +684,7 @@
dialog_layout -> addWidget(information_label);
// ajoute un QTextEdit au dialogue
- auto *text_field = new QTextEdit();
+ QTextEdit *text_field = new QTextEdit();
text_field -> setAcceptRichText(false);
text_field -> setPlainText(informations());
text_field -> setReadOnly(is_read_only);
@@ -738,7 +738,7 @@
dialog.setModal(true);
dialog.setMinimumSize(400, 330);
dialog.setWindowTitle(tr("Éditer les noms", "window title"));
- auto *dialog_layout = new QVBoxLayout(&dialog);
+ QVBoxLayout *dialog_layout = new QVBoxLayout(&dialog);
// ajoute un champ explicatif au dialogue
QLabel *information_label = new QLabel(tr("Vous pouvez spécifier le nom de l'élément dans plusieurs langues."));
@@ -747,7 +747,7 @@
dialog_layout -> addWidget(information_label);
// ajoute un NamesListWidget au dialogue
- auto *names_widget = new NamesListWidget();
+ NamesListWidget *names_widget = new NamesListWidget();
names_widget -> setNames(m_names_list);
names_widget -> setReadOnly(is_read_only);
dialog_layout -> addWidget(names_widget);
@@ -772,7 +772,7 @@
QList<CustomElementPart *> ElementScene::primitives() const {
QList<CustomElementPart *> primitives_list;
foreach (QGraphicsItem *item, items()) {
- if (auto *primitive = dynamic_cast<CustomElementPart *>(item)) {
+ if (CustomElementPart *primitive = dynamic_cast<CustomElementPart *>(item)) {
primitives_list << primitive;
}
}
@@ -1001,7 +1001,7 @@
else if (qde.tagName() == "input") cep = pdtf = new PartDynamicTextField(m_element_editor);
else continue;
- if (auto *qgi = dynamic_cast<QGraphicsItem *>(cep))
+ if (QGraphicsItem *qgi = dynamic_cast<QGraphicsItem *>(cep))
{
if (!qgi->zValue())
qgi->setZValue(z++);
@@ -1180,7 +1180,7 @@
if (!command -> elementView()) {
foreach (QGraphicsView *view, views()) {
- if (auto *element_view = dynamic_cast<ElementView *>(view)) {
+ if (ElementView *element_view = dynamic_cast<ElementView *>(view)) {
command -> setElementView(element_view);
break;
}
Modified: trunk/sources/editor/elementview.cpp
===================================================================
--- trunk/sources/editor/elementview.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/elementview.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -296,7 +296,7 @@
// si quelque chose a effectivement ete ajoute au schema, on cree un objet d'annulation
if (content_pasted.count()) {
m_scene -> clearSelection();
- auto *undo_object = new PastePartsCommand(this, content_pasted);
+ PastePartsCommand *undo_object = new PastePartsCommand(this, content_pasted);
m_scene -> undoStack().push(undo_object);
}
return(content_pasted);
@@ -343,7 +343,7 @@
// si quelque chose a effectivement ete ajoute au schema, on cree un objet d'annulation
if (content_pasted.count()) {
m_scene -> clearSelection();
- auto *undo_object = new PastePartsCommand(this, content_pasted);
+ PastePartsCommand *undo_object = new PastePartsCommand(this, content_pasted);
undo_object -> setOffset(offset_paste_count_ - 1, old_start_top_left_corner, offset_paste_count_, start_top_left_corner_);
m_scene -> undoStack().push(undo_object);
}
@@ -446,7 +446,7 @@
*/
bool ElementView::gestureEvent(QGestureEvent *event){
if (QGesture *gesture = event->gesture(Qt::PinchGesture)) {
- auto *pinch = static_cast<QPinchGesture *>(gesture);
+ QPinchGesture *pinch = static_cast<QPinchGesture *>(gesture);
if (pinch->changeFlags() & QPinchGesture::ScaleFactorChanged){
qreal value = gesture->property("scaleFactor").toReal();
if (value > 1){
@@ -515,9 +515,9 @@
qreal limite_x = r.x() + r.width();
qreal limite_y = r.y() + r.height();
- auto g_x = (int)ceil(r.x());
+ int g_x = (int)ceil(r.x());
while (g_x % drawn_x_grid) ++ g_x;
- auto g_y = (int)ceil(r.y());
+ int g_y = (int)ceil(r.y());
while (g_y % drawn_y_grid) ++ g_y;
for (int gx = g_x ; gx < limite_x ; gx += drawn_x_grid) {
Modified: trunk/sources/editor/ellipseeditor.cpp
===================================================================
--- trunk/sources/editor/ellipseeditor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/ellipseeditor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -44,9 +44,9 @@
h->setRange(-5000, 5000);
v->setRange(-5000, 5000);
- auto *v_layout = new QVBoxLayout(this);
+ QVBoxLayout *v_layout = new QVBoxLayout(this);
- auto *grid = new QGridLayout();
+ QGridLayout *grid = new QGridLayout();
grid -> addWidget(new QLabel(tr("Centre : ")), 0, 0);
grid -> addWidget(new QLabel("x"), 1, 0, Qt::AlignRight);
grid -> addWidget(x, 1, 1);
@@ -88,7 +88,7 @@
style_ -> setPart(nullptr);
return(true);
}
- if (auto *part_ellipse = dynamic_cast<PartEllipse *>(new_part))
+ if (PartEllipse *part_ellipse = dynamic_cast<PartEllipse *>(new_part))
{
if (part == part_ellipse) return true;
if (part)
Modified: trunk/sources/editor/graphicspart/partarc.cpp
===================================================================
--- trunk/sources/editor/graphicspart/partarc.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/graphicspart/partarc.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -218,7 +218,7 @@
//Watched must be an handler
if(watched->type() == QetGraphicsHandlerItem::Type)
{
- auto *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
+ QetGraphicsHandlerItem *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
if(m_handler_vector.contains(qghi)) //Handler must be in m_vector_index, then we can start resize
{
Modified: trunk/sources/editor/graphicspart/partellipse.cpp
===================================================================
--- trunk/sources/editor/graphicspart/partellipse.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/graphicspart/partellipse.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -214,7 +214,7 @@
//Watched must be an handler
if(watched->type() == QetGraphicsHandlerItem::Type)
{
- auto *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
+ QetGraphicsHandlerItem *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
if(m_handler_vector.contains(qghi)) //Handler must be in m_vector_index, then we can start resize
{
Modified: trunk/sources/editor/graphicspart/partline.cpp
===================================================================
--- trunk/sources/editor/graphicspart/partline.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/graphicspart/partline.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -190,7 +190,7 @@
//Watched must be an handler
if(watched->type() == QetGraphicsHandlerItem::Type)
{
- auto *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
+ QetGraphicsHandlerItem *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
if(m_handler_vector.contains(qghi)) //Handler must be in m_vector_index, then we can start resize
{
Modified: trunk/sources/editor/graphicspart/partpolygon.cpp
===================================================================
--- trunk/sources/editor/graphicspart/partpolygon.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/graphicspart/partpolygon.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -308,7 +308,7 @@
//Watched must be an handler
if(watched->type() == QetGraphicsHandlerItem::Type)
{
- auto *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
+ QetGraphicsHandlerItem *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
if(m_handler_vector.contains(qghi)) //Handler must be in m_vector_index, then we can start resize
{
Modified: trunk/sources/editor/graphicspart/partrectangle.cpp
===================================================================
--- trunk/sources/editor/graphicspart/partrectangle.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/graphicspart/partrectangle.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -322,7 +322,7 @@
//Watched must be an handler
if(watched->type() == QetGraphicsHandlerItem::Type)
{
- auto *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
+ QetGraphicsHandlerItem *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
if(m_handler_vector.contains(qghi)) //Handler must be in m_vector_index, then we can start resize
{
Modified: trunk/sources/editor/lineeditor.cpp
===================================================================
--- trunk/sources/editor/lineeditor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/lineeditor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -62,7 +62,7 @@
end1_length = new QDoubleSpinBox();
end2_length = new QDoubleSpinBox();
- auto *grid = new QGridLayout();
+ QGridLayout *grid = new QGridLayout();
grid -> addWidget(new QLabel("x1"), 0, 0);
grid -> addWidget(x1, 0, 1);
grid -> addWidget(new QLabel("y1"), 0, 2);
@@ -72,7 +72,7 @@
grid -> addWidget(new QLabel("y2"), 1, 2);
grid -> addWidget(y2, 1, 3);
- auto *grid2 = new QGridLayout();
+ QGridLayout *grid2 = new QGridLayout();
grid2 -> addWidget(new QLabel(tr("Fin 1")), 0, 0);
grid2 -> addWidget(end1_type, 0, 1);
grid2 -> addWidget(end1_length, 0, 2);
@@ -80,7 +80,7 @@
grid2 -> addWidget(end2_type, 1, 1);
grid2 -> addWidget(end2_length, 1, 2);
- auto *v_layout = new QVBoxLayout(this);
+ QVBoxLayout *v_layout = new QVBoxLayout(this);
v_layout -> addWidget(style_);
v_layout -> addLayout(grid);
v_layout -> addLayout(grid2);
@@ -115,7 +115,7 @@
style_ -> setPart(nullptr);
return(true);
}
- if (auto *part_line = dynamic_cast<PartLine *>(new_part))
+ if (PartLine *part_line = dynamic_cast<PartLine *>(new_part))
{
if (part == part_line) return true;
if (part)
Modified: trunk/sources/editor/polygoneditor.cpp
===================================================================
--- trunk/sources/editor/polygoneditor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/polygoneditor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -45,7 +45,7 @@
updateForm();
// layout
- auto *layout = new QVBoxLayout(this);
+ QVBoxLayout *layout = new QVBoxLayout(this);
layout -> addWidget(style_);
layout -> addWidget(new QLabel(tr("Points du polygone :")));
layout -> addWidget(&points_list);
@@ -106,7 +106,7 @@
point = part -> mapToScene(point);
QStringList qsl;
qsl << QString("%1").arg(point.x()) << QString("%1").arg(point.y());
- auto *qtwi = new QTreeWidgetItem(qsl);
+ QTreeWidgetItem *qtwi = new QTreeWidgetItem(qsl);
qtwi -> setFlags(Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsSelectable);
points_list.addTopLevelItem(qtwi);
}
@@ -135,7 +135,7 @@
style_ -> setPart(nullptr);
return(true);
}
- if (auto *part_polygon = dynamic_cast<PartPolygon *>(new_part))
+ if (PartPolygon *part_polygon = dynamic_cast<PartPolygon *>(new_part))
{
if (part == part_polygon) return true;
if (part)
Modified: trunk/sources/editor/qetelementeditor.cpp
===================================================================
--- trunk/sources/editor/qetelementeditor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/qetelementeditor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -537,7 +537,7 @@
m_undo_dock -> setFeatures(QDockWidget::AllDockWidgetFeatures);
m_undo_dock -> setMinimumWidth(290);
addDockWidget(Qt::RightDockWidgetArea, m_undo_dock);
- auto* undo_view = new QUndoView(&(m_elmt_scene -> undoStack()), this);
+ QUndoView* undo_view = new QUndoView(&(m_elmt_scene -> undoStack()), this);
undo_view -> setEmptyLabel(tr("Aucune modification"));
m_undo_dock -> setWidget(undo_view);
@@ -596,7 +596,7 @@
style_editable = true;
foreach (QGraphicsItem *qgi, selected_qgis)
{
- if (auto *cep = dynamic_cast<CustomElementPart *>(qgi))
+ if (CustomElementPart *cep = dynamic_cast<CustomElementPart *>(qgi))
cep_list << cep;
else
style_editable = false;
@@ -609,11 +609,11 @@
if(selected_qgis.size() == 1)
{
QGraphicsItem *qgi = selected_qgis.first();
- if (auto *selection = dynamic_cast<CustomElementPart *>(qgi))
+ if (CustomElementPart *selection = dynamic_cast<CustomElementPart *>(qgi))
{
if (QWidget *widget = m_tools_dock_stack->widget(1))
{
- if (auto *editor = dynamic_cast<ElementItemEditor *>(widget))
+ if (ElementItemEditor *editor = dynamic_cast<ElementItemEditor *>(widget))
{
if(editor->currentPart() == selection)
return;
@@ -626,11 +626,11 @@
if (selected_qgis.size() == 1)
{
QGraphicsItem *qgi = selected_qgis.first();
- if (auto *selection = dynamic_cast<CustomElementPart *>(qgi))
+ if (CustomElementPart *selection = dynamic_cast<CustomElementPart *>(qgi))
{
//The current editor already edit the selected part
if (QWidget *widget = m_tools_dock_stack->widget(1))
- if (auto *editor = dynamic_cast<ElementItemEditor *>(widget))
+ if (ElementItemEditor *editor = dynamic_cast<ElementItemEditor *>(widget))
if(editor->currentPart() == selection)
return;
@@ -1065,7 +1065,7 @@
QString program = (QDir::homePath() + "/.qet/DXFtoQET");
#endif
QStringList arguments;
-auto *DXF = new QProcess(qApp);
+QProcess *DXF = new QProcess(qApp);
DXF->start(program,arguments);
}
@@ -1336,9 +1336,9 @@
if (qgis.count() <= QET_MAX_PARTS_IN_ELEMENT_EDITOR_LIST) {
for (int j = qgis.count() - 1 ; j >= 0 ; -- j) {
QGraphicsItem *qgi = qgis[j];
- if (auto *cep = dynamic_cast<CustomElementPart *>(qgi)) {
+ if (CustomElementPart *cep = dynamic_cast<CustomElementPart *>(qgi)) {
QString part_desc = cep -> name();
- auto *qlwi = new QListWidgetItem(part_desc);
+ QListWidgetItem *qlwi = new QListWidgetItem(part_desc);
QVariant v;
v.setValue<QGraphicsItem *>(qgi);
qlwi -> setData(42, v);
@@ -1382,7 +1382,7 @@
m_parts_list -> blockSignals(true);
for (int i = 0 ; i < m_parts_list -> count() ; ++ i) {
QListWidgetItem *qlwi = m_parts_list -> item(i);
- auto *qgi = qlwi -> data(42).value<QGraphicsItem *>();
+ QGraphicsItem *qgi = qlwi -> data(42).value<QGraphicsItem *>();
if (qgi) {
qgi -> setSelected(qlwi -> isSelected());
}
@@ -1578,7 +1578,7 @@
if (!m_tools_dock_stack -> currentIndex()) return;
// s'il y a un widget d'edition affiche, on le met a jour
- if (auto *current_editor = dynamic_cast<ElementItemEditor *>(m_tools_dock_stack->widget(1))) {
+ if (ElementItemEditor *current_editor = dynamic_cast<ElementItemEditor *>(m_tools_dock_stack->widget(1))) {
current_editor -> updateForm();
}
}
Modified: trunk/sources/editor/styleeditor.cpp
===================================================================
--- trunk/sources/editor/styleeditor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/styleeditor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -98,7 +98,7 @@
main_layout -> addWidget(new QLabel("<u>" + tr("Apparence :") + "</u> "));
- auto *color_layout = new QHBoxLayout();
+ QHBoxLayout *color_layout = new QHBoxLayout();
color_layout -> addWidget(new QLabel(tr("Contour :")), 0, Qt::AlignRight);
color_layout -> addWidget(outline_color);
color_layout -> addSpacing(10);
@@ -106,7 +106,7 @@
color_layout -> addWidget(filling_color);
main_layout -> addLayout(color_layout);
- auto *style_layout = new QHBoxLayout();
+ QHBoxLayout *style_layout = new QHBoxLayout();
style_layout -> addWidget(new QLabel(tr("Style : ")), 0, Qt::AlignRight);
style_layout -> addWidget(line_style);
style_layout -> addSpacing(10);
@@ -205,7 +205,7 @@
return(true);
}
- if (auto *part_graphic = dynamic_cast<CustomElementGraphicPart *>(new_part))
+ if (CustomElementGraphicPart *part_graphic = dynamic_cast<CustomElementGraphicPart *>(new_part))
{
part = part_graphic;
updateForm();
@@ -237,7 +237,7 @@
foreach (CustomElementPart *cep, part_list)
{
- if (auto *cegp = dynamic_cast<CustomElementGraphicPart *>(cep))
+ if (CustomElementGraphicPart *cegp = dynamic_cast<CustomElementGraphicPart *>(cep))
m_part_list << cegp;
else
return false;
Modified: trunk/sources/editor/terminaleditor.cpp
===================================================================
--- trunk/sources/editor/terminaleditor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/terminaleditor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -48,10 +48,10 @@
orientation -> addItem(QET::Icons::South, tr("Sud"), Qet::South);
orientation -> addItem(QET::Icons::West, tr("Ouest"), Qet::West);
- auto *main_layout = new QVBoxLayout();
+ QVBoxLayout *main_layout = new QVBoxLayout();
main_layout -> addWidget(new QLabel(tr("Position : ")));
- auto *position = new QHBoxLayout();
+ QHBoxLayout *position = new QHBoxLayout();
position -> addWidget(new QLabel(tr("x : ")));
position -> addWidget(qle_x );
position -> addWidget(new QLabel(tr("y : ")));
@@ -58,7 +58,7 @@
position -> addWidget(qle_y );
main_layout -> addLayout(position);
- auto *ori = new QHBoxLayout();
+ QHBoxLayout *ori = new QHBoxLayout();
ori -> addWidget(new QLabel(tr("Orientation : ")));
ori -> addWidget(orientation );
main_layout -> addLayout(ori);
@@ -91,7 +91,7 @@
part = nullptr;
return(true);
}
- if (auto *part_terminal = dynamic_cast<PartTerminal *>(new_part))
+ if (PartTerminal *part_terminal = dynamic_cast<PartTerminal *>(new_part))
{
if(part == part_terminal) return true;
if (part)
Modified: trunk/sources/editor/texteditor.cpp
===================================================================
--- trunk/sources/editor/texteditor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/texteditor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -51,10 +51,10 @@
qle_x -> setRange(-5000, 5000);
qle_y -> setRange(-5000, 5000);
- auto *main_layout = new QVBoxLayout();
+ QVBoxLayout *main_layout = new QVBoxLayout();
main_layout -> addWidget(new QLabel(tr("Position : ")));
- auto *position = new QHBoxLayout();
+ QHBoxLayout *position = new QHBoxLayout();
position -> addWidget(new QLabel(tr("x : ")));
position -> addWidget(qle_x );
position -> addWidget(new QLabel(tr("y : ")));
@@ -61,12 +61,12 @@
position -> addWidget(qle_y );
main_layout -> addLayout(position);
- auto *fs = new QHBoxLayout();
+ QHBoxLayout *fs = new QHBoxLayout();
fs -> addWidget(new QLabel(tr("Taille : ")));
fs -> addWidget(font_size);
main_layout -> addLayout(fs);
- auto *color_layout = new QHBoxLayout();
+ QHBoxLayout *color_layout = new QHBoxLayout();
color_layout -> addWidget(new QLabel(tr("Couleur : ")));
color_layout -> addWidget(black_color_);
color_layout -> addWidget(white_color_);
@@ -73,11 +73,11 @@
color_layout -> addStretch();
main_layout -> addLayout(color_layout);
- auto *t = new QHBoxLayout();
+ QHBoxLayout *t = new QHBoxLayout();
t -> addWidget(new QLabel(tr("Texte : ")));
t -> addWidget(qle_text);
- auto *rotation_angle_layout = new QHBoxLayout();
+ QHBoxLayout *rotation_angle_layout = new QHBoxLayout();
rotation_angle_layout -> addWidget(rotation_angle_label);
rotation_angle_layout -> addWidget(rotation_angle_);
@@ -110,7 +110,7 @@
part = nullptr;
return(true);
}
- if (auto *part_text = dynamic_cast<PartText *>(new_part))
+ if (PartText *part_text = dynamic_cast<PartText *>(new_part))
{
if (part == part_text) return true;
part = part_text;
Modified: trunk/sources/editor/ui/dynamictextfieldeditor.cpp
===================================================================
--- trunk/sources/editor/ui/dynamictextfieldeditor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/ui/dynamictextfieldeditor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -228,7 +228,7 @@
void DynamicTextFieldEditor::on_m_width_sb_editingFinished()
{
- auto width = (qreal)ui->m_width_sb->value();
+ qreal width = (qreal)ui->m_width_sb->value();
if(width != m_text_field.data()->textWidth())
{
Modified: trunk/sources/editor/ui/elementpropertieseditorwidget.cpp
===================================================================
--- trunk/sources/editor/ui/elementpropertieseditorwidget.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/ui/elementpropertieseditorwidget.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -156,7 +156,7 @@
for(const QString& key : keys)
{
- auto *qtwi = new QTreeWidgetItem(ui->m_tree);
+ QTreeWidgetItem *qtwi = new QTreeWidgetItem(ui->m_tree);
qtwi->setFlags(Qt::ItemIsEnabled | Qt::ItemIsEditable);
qtwi->setData(0, Qt::DisplayRole, QETApp::elementTranslatedInfoKey(key));
qtwi->setData(0, Qt::UserRole, key);
Modified: trunk/sources/editor/ui/rectangleeditor.cpp
===================================================================
--- trunk/sources/editor/ui/rectangleeditor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/editor/ui/rectangleeditor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -68,7 +68,7 @@
return(true);
}
- if (auto *part_rectangle = dynamic_cast<PartRectangle *>(part))
+ if (PartRectangle *part_rectangle = dynamic_cast<PartRectangle *>(part))
{
if (m_part == part_rectangle) {
return true;
@@ -147,7 +147,7 @@
}
m_locked = true;
- auto *undo = new QUndoCommand();
+ QUndoCommand *undo = new QUndoCommand();
undo->setText(tr("Modifier un rectangle"));
QRectF rect(editedTopLeft(), QSizeF(ui->m_width_sb->value(), ui->m_height_sb->value()));
Modified: trunk/sources/elementdialog.cpp
===================================================================
--- trunk/sources/elementdialog.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/elementdialog.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -53,7 +53,7 @@
setWindowFlags(Qt::Sheet);
#endif
- auto *layout = new QVBoxLayout(this);
+ QVBoxLayout *layout = new QVBoxLayout(this);
QString title_, label_;
switch (m_mode)
@@ -142,7 +142,7 @@
*/
void ElementDialog::indexClicked(const QModelIndex &index)
{
- auto *eci = static_cast<ElementCollectionItem*> (m_model->itemFromIndex(index));
+ ElementCollectionItem *eci = static_cast<ElementCollectionItem*> (m_model->itemFromIndex(index));
m_location = ElementsLocation(eci->collectionPath());
checkCurrentLocation();
}
@@ -300,7 +300,7 @@
*/
ElementsLocation ElementDialog::execConfiguredDialog(int mode, QWidget *parentWidget)
{
- auto *element_dialog = new ElementDialog(mode, parentWidget);
+ ElementDialog *element_dialog = new ElementDialog(mode, parentWidget);
element_dialog->exec();
ElementsLocation location = element_dialog->location();
delete element_dialog;
Modified: trunk/sources/elementscategoryeditor.cpp
===================================================================
--- trunk/sources/elementscategoryeditor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/elementscategoryeditor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -99,7 +99,7 @@
*/
void ElementsCategoryEditor::setUpWidget()
{
- auto *editor_layout = new QVBoxLayout();
+ QVBoxLayout *editor_layout = new QVBoxLayout();
setLayout(editor_layout);
m_names_list = new NamesListWidget();
@@ -109,7 +109,7 @@
m_buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
connect(m_buttons, SIGNAL(rejected()), this, SLOT(reject()));
- auto *internal_name_layout = new QHBoxLayout();
+ QHBoxLayout *internal_name_layout = new QHBoxLayout();
internal_name_layout -> addWidget(m_file_name);
internal_name_layout -> addWidget(m_file_line_edit);
Modified: trunk/sources/elementsmover.cpp
===================================================================
--- trunk/sources/elementsmover.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/elementsmover.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -128,7 +128,7 @@
if (!movement_running_) return;
//empty command to be used has parent of commands below
- auto *undo_object = new QUndoCommand();
+ QUndoCommand *undo_object = new QUndoCommand();
//Create undo move if there is a movement
if (!current_movement_.isNull()) {
@@ -151,7 +151,7 @@
{
QPair <Terminal *, Terminal *> pair = elmt -> AlignedFreeTerminals().takeFirst();
- auto *conductor = new Conductor(pair.first, pair.second);
+ Conductor *conductor = new Conductor(pair.first, pair.second);
//Create an undo object for each new auto conductor, with undo_object for parent
new AddItemCommand<Conductor *>(conductor, diagram_, QPointF(), undo_object);
Modified: trunk/sources/elementspanel.cpp
===================================================================
--- trunk/sources/elementspanel.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/elementspanel.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -98,11 +98,11 @@
void ElementsPanel::startTitleBlockTemplateDrag(const TitleBlockTemplateLocation &location) {
QString location_string = location.toString();
- auto *mime_data = new QMimeData();
+ QMimeData *mime_data = new QMimeData();
mime_data -> setText(location_string);
mime_data -> setData("application/x-qet-titleblock-uri", location_string.toLatin1());
- auto *drag = new QDrag(this);
+ QDrag *drag = new QDrag(this);
drag -> setMimeData(mime_data);
drag -> setPixmap(QET::Icons::TitleBlock.pixmap(22, 16));
drag -> start(Qt::CopyAction);
@@ -232,10 +232,10 @@
void ElementsPanel::slot_doubleClick(QTreeWidgetItem *qtwi, int) {
int qtwi_type = qtwi -> type();
if (qtwi_type == QET::Project) {
- auto *project = valueForItem<QETProject *>(qtwi);
+ QETProject *project = valueForItem<QETProject *>(qtwi);
emit(requestForProject(project));
} else if (qtwi_type == QET::Diagram) {
- auto *diagram = valueForItem<Diagram *>(qtwi);
+ Diagram *diagram = valueForItem<Diagram *>(qtwi);
emit(requestForDiagram(diagram));
} else if (qtwi_type == QET::TitleBlockTemplate) {
TitleBlockTemplateLocation tbt = valueForItem<TitleBlockTemplateLocation>(qtwi);
Modified: trunk/sources/elementspanelwidget.cpp
===================================================================
--- trunk/sources/elementspanelwidget.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/elementspanelwidget.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -99,7 +99,7 @@
);
// disposition verticale
- auto *vlayout = new QVBoxLayout(this);
+ QVBoxLayout *vlayout = new QVBoxLayout(this);
vlayout -> setMargin(0);
vlayout -> setSpacing(0);
vlayout -> addWidget(filter_textfield);
Modified: trunk/sources/elementtextpattern.cpp
===================================================================
--- trunk/sources/elementtextpattern.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/elementtextpattern.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -238,7 +238,7 @@
//Add the texts to element
for(const QDomElement& text : texts)
{
- auto *deti = new DynamicElementTextItem(m_element);
+ DynamicElementTextItem *deti = new DynamicElementTextItem(m_element);
undo_stack.push(new AddElementTextCommand(m_element, deti));
deti->fromXml(text);
}
Modified: trunk/sources/elementtextsmover.cpp
===================================================================
--- trunk/sources/elementtextsmover.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/elementtextsmover.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -119,7 +119,7 @@
for (QGraphicsItem *qgi : m_items_hash.keys())
{
- if(auto *object = dynamic_cast<QObject *>(qgi))
+ if(QObject *object = dynamic_cast<QObject *>(qgi))
{
QPropertyUndoCommand *child_undo = new QPropertyUndoCommand(object, "pos", m_items_hash.value(qgi), qgi->pos(), undo);
child_undo->enableAnimation();
Modified: trunk/sources/exportdialog.cpp
===================================================================
--- trunk/sources/exportdialog.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/exportdialog.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -71,7 +71,7 @@
// disposition des elements
- auto *hLayout = new QHBoxLayout();
+ QHBoxLayout *hLayout = new QHBoxLayout();
hLayout -> addWidget(new QLabel(tr("Choisissez les folios que vous désirez exporter ainsi que leurs dimensions :")));
selectAll = new QPushButton();
deSelectAll = new QPushButton();
@@ -83,7 +83,7 @@
connect(deSelectAll, SIGNAL(clicked()), this, SLOT(slot_deSelectAllClicked()));
- auto *layout = new QVBoxLayout(this);
+ QVBoxLayout *layout = new QVBoxLayout(this);
layout -> addLayout(hLayout);
layout -> addWidget(initDiagramsListPart(), 1);
layout -> addWidget(epw);
@@ -177,7 +177,7 @@
QWidget *widget_diagrams_list = new QWidget();
widget_diagrams_list -> setLayout(diagrams_list_layout_);
- auto *scroll_diagrams_list = new QScrollArea();
+ QScrollArea *scroll_diagrams_list = new QScrollArea();
scroll_diagrams_list -> setWidget(widget_diagrams_list);
return(scroll_diagrams_list);
@@ -426,7 +426,7 @@
//QList<QRectF *> list_ellipses;
QList <QetShapeItem *> list_shapes;
- auto *ptr = dynamic_cast<DiagramFolioList *>(diagram);
+ DiagramFolioList *ptr = dynamic_cast<DiagramFolioList *>(diagram);
if (ptr) {
list_lines = ptr -> lines();
list_rectangles = ptr -> rectangles();
@@ -469,15 +469,15 @@
} else {
// Determine les elements a "XMLiser"
foreach(QGraphicsItem *qgi, diagram -> items()) {
- if (auto *elmt = qgraphicsitem_cast<Element *>(qgi)) {
+ if (Element *elmt = qgraphicsitem_cast<Element *>(qgi)) {
list_elements << elmt;
- } else if (auto *f = qgraphicsitem_cast<Conductor *>(qgi)) {
+ } else if (Conductor *f = qgraphicsitem_cast<Conductor *>(qgi)) {
list_conductors << f;
- } else if (auto *iti = qgraphicsitem_cast<IndependentTextItem *>(qgi)) {
+ } else if (IndependentTextItem *iti = qgraphicsitem_cast<IndependentTextItem *>(qgi)) {
list_texts << iti;
- } else if (auto *dii = qgraphicsitem_cast<DiagramImageItem *>(qgi)) {
+ } else if (DiagramImageItem *dii = qgraphicsitem_cast<DiagramImageItem *>(qgi)) {
list_images << dii;
- } else if (auto *dii = qgraphicsitem_cast<QetShapeItem *>(qgi)) {
+ } else if (QetShapeItem *dii = qgraphicsitem_cast<QetShapeItem *>(qgi)) {
list_shapes << dii;
}
}
@@ -909,14 +909,14 @@
preview_dialog.setWindowTitle(tr("Aperçu"));
preview_dialog.setWindowState(preview_dialog.windowState() | Qt::WindowMaximized);
- auto *preview_scene = new QGraphicsScene();
+ QGraphicsScene *preview_scene = new QGraphicsScene();
preview_scene -> setBackgroundBrush(Qt::lightGray);
- auto *preview_view = new QGraphicsView(preview_scene);
+ QGraphicsView *preview_view = new QGraphicsView(preview_scene);
preview_view -> setDragMode(QGraphicsView::ScrollHandDrag);
QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Ok);
connect(buttons, SIGNAL(accepted()), &preview_dialog, SLOT(accept()));
- auto *vboxlayout1 = new QVBoxLayout();
+ QVBoxLayout *vboxlayout1 = new QVBoxLayout();
vboxlayout1 -> addWidget(preview_view);
vboxlayout1 -> addWidget(buttons);
preview_dialog.setLayout(vboxlayout1);
@@ -1050,7 +1050,7 @@
taille d'un schema avant son export.
*/
QBoxLayout *ExportDialog::ExportDiagramLine::sizeLayout() {
- auto *layout = new QHBoxLayout();
+ QHBoxLayout *layout = new QHBoxLayout();
layout -> addWidget(width);
layout -> addWidget(x_label);
layout -> addWidget(height);
Modified: trunk/sources/exportpropertieswidget.cpp
===================================================================
--- trunk/sources/exportpropertieswidget.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/exportpropertieswidget.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -118,14 +118,14 @@
*/
void ExportPropertiesWidget::build() {
// le dialogue est un empilement vertical d'elements
- auto *vboxLayout = new QVBoxLayout();
+ QVBoxLayout *vboxLayout = new QVBoxLayout();
vboxLayout -> setContentsMargins(0, 0, 0, 0);
/* le dialogue comprend une ligne permettant d'indiquer un chemin de dossier (hboxLayout) */
- auto *hboxLayout = new QHBoxLayout();
+ QHBoxLayout *hboxLayout = new QHBoxLayout();
dirpath_label = new QLabel(tr("Dossier cible :"), this);
dirpath = new QLineEdit(this);
- auto *completer = new QCompleter(this);
+ QCompleter *completer = new QCompleter(this);
completer -> setModel(new QDirModel(completer));
dirpath -> setCompleter(completer);
button_browse = new QPushButton(tr("Parcourir"), this);
@@ -137,7 +137,7 @@
vboxLayout -> addLayout(hboxLayout);
/* une ligne permettant de choisir le format (hboxLayout1) */
- auto *hboxLayout1 = new QHBoxLayout();
+ QHBoxLayout *hboxLayout1 = new QHBoxLayout();
format_label = new QLabel(tr("Format :"), this);
hboxLayout1 -> addWidget(format_label);
hboxLayout1 -> addWidget(format = new QComboBox(this));
@@ -152,7 +152,7 @@
/* un cadre permettant de specifier les options de l'image finale */
QGroupBox *groupbox_options = new QGroupBox(tr("Options de rendu", "groupbox title"));
- auto *optionshlayout = new QGridLayout(groupbox_options);
+ QGridLayout *optionshlayout = new QGridLayout(groupbox_options);
// Choix de la zone du schema a exporter
exported_content_choices = new QButtonGroup(groupbox_options);
Modified: trunk/sources/genericpanel.cpp
===================================================================
--- trunk/sources/genericpanel.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/genericpanel.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -579,7 +579,7 @@
QTreeWidgetItem *qtwi_diagram = qtwi_project -> child(i);
if (!qtwi_diagram) continue;
- auto *diagram = valueForItem<Diagram *>(qtwi_diagram);
+ Diagram *diagram = valueForItem<Diagram *>(qtwi_diagram);
if (diagram)
updateDiagramItem(qtwi_diagram, diagram);
}
@@ -665,7 +665,7 @@
@return the create QTreeWidgetItem
*/
QTreeWidgetItem *GenericPanel::makeItem(QET::ItemType type, QTreeWidgetItem *parent, const QString &label, const QIcon &icon) {
- auto *qtwi = new QTreeWidgetItem(parent, type);
+ QTreeWidgetItem *qtwi = new QTreeWidgetItem(parent, type);
qtwi -> setText(0, label.isEmpty() ? defaultText(type) : label);
qtwi -> setIcon(0, icon.isNull() ? defaultIcon(type) : icon);
return(qtwi);
@@ -745,7 +745,7 @@
void GenericPanel::removeObsoleteItems(const QList<T> &expected_items, QTreeWidgetItem *item, QET::ItemType type, bool recursive) {
// remove items not found in expected_items
foreach (QTreeWidgetItem *child_item, childItems(item, type, recursive)) {
- auto child_value = valueForItem<T>(child_item);
+ T child_value = valueForItem<T>(child_item);
if (!expected_items.contains(child_value)) {
deleteItem(child_item);
}
Modified: trunk/sources/nameslistwidget.cpp
===================================================================
--- trunk/sources/nameslistwidget.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/nameslistwidget.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -24,7 +24,7 @@
@param parent QWidget parent de la liste de noms
*/
NamesListWidget::NamesListWidget(QWidget *parent) : QWidget(parent), read_only(false) {
- auto *names_list_layout = new QVBoxLayout();
+ QVBoxLayout *names_list_layout = new QVBoxLayout();
setLayout(names_list_layout);
tree_names = new QTreeWidget();
@@ -70,7 +70,7 @@
void NamesListWidget::addLine() {
clean();
if (read_only) return;
- auto *qtwi = new QTreeWidgetItem();
+ QTreeWidgetItem *qtwi = new QTreeWidgetItem();
qtwi -> setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable);
tree_names -> addTopLevelItem(qtwi);
tree_names -> setCurrentItem(qtwi);
@@ -137,7 +137,7 @@
QString value = provided_names[lang];
QStringList values;
values << lang << value;
- auto *qtwi = new QTreeWidgetItem(values);
+ QTreeWidgetItem *qtwi = new QTreeWidgetItem(values);
if (!read_only) qtwi -> setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable);
tree_names -> addTopLevelItem(qtwi);
tree_names -> sortItems(0, Qt::AscendingOrder);
Modified: trunk/sources/newelementwizard.cpp
===================================================================
--- trunk/sources/newelementwizard.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/newelementwizard.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -74,11 +74,11 @@
*/
QWizardPage *NewElementWizard::buildStep1()
{
- auto *page = new QWizardPage();
+ QWizardPage *page = new QWizardPage();
page -> setProperty("WizardState", Category);
page -> setTitle(tr("Étape 1/3 : Catégorie parente", "wizard page title"));
page -> setSubTitle(tr("Sélectionnez une catégorie dans laquelle enregistrer le nouvel élément.", "wizard page subtitle"));
- auto *layout = new QVBoxLayout();
+ QVBoxLayout *layout = new QVBoxLayout();
m_tree_view = new QTreeView(this);
@@ -100,11 +100,11 @@
* @return
*/
QWizardPage *NewElementWizard::buildStep2() {
- auto *page = new QWizardPage();
+ QWizardPage *page = new QWizardPage();
page -> setProperty("WizardState", Filename);
page -> setTitle(tr("Étape 2/3 : Nom du fichier", "wizard page title"));
page -> setSubTitle(tr("Indiquez le nom du fichier dans lequel enregistrer le nouvel élément.", "wizard page subtitle"));
- auto *layout = new QVBoxLayout();
+ QVBoxLayout *layout = new QVBoxLayout();
m_qle_filename = new QFileNameEdit(tr("nouvel_element"));
m_qle_filename -> selectAll();
@@ -124,11 +124,11 @@
* @return
*/
QWizardPage *NewElementWizard::buildStep3() {
- auto *page = new QWizardPage();
+ QWizardPage *page = new QWizardPage();
page -> setProperty("WizardState", Names);
page -> setTitle(tr("Étape 3/3 : Noms de l'élément", "wizard page title"));
page -> setSubTitle(tr("Indiquez le ou les noms de l'élément.", "wizard page subtitle"));
- auto *layout = new QVBoxLayout();
+ QVBoxLayout *layout = new QVBoxLayout();
m_names_list = new NamesListWidget();
NamesList hash_name;
@@ -170,7 +170,7 @@
QModelIndex index = m_tree_view->currentIndex();
if (index.isValid()) {
- auto *eci = static_cast<ElementCollectionItem*>(m_model->itemFromIndex(index));
+ ElementCollectionItem *eci = static_cast<ElementCollectionItem*>(m_model->itemFromIndex(index));
if (eci && eci->isDir()) {
ElementsLocation loc(eci->collectionPath());
if (loc.exist()) {
@@ -226,7 +226,7 @@
* Lauch an element editor for create the new element
*/
void NewElementWizard::createNewElement() {
- auto *edit_new_element = new QETElementEditor(parentWidget());
+ QETElementEditor *edit_new_element = new QETElementEditor(parentWidget());
edit_new_element -> setNames(m_names_list -> names());
ElementsLocation loc_ = m_chosen_location;
Modified: trunk/sources/projectconfigpages.cpp
===================================================================
--- trunk/sources/projectconfigpages.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/projectconfigpages.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -179,8 +179,8 @@
Initialize the layout of this page.
*/
void ProjectMainConfigPage::initLayout() {
- auto *main_layout0 = new QVBoxLayout();
- auto *title_layout0 = new QHBoxLayout();
+ QVBoxLayout *main_layout0 = new QVBoxLayout();
+ QHBoxLayout *title_layout0 = new QHBoxLayout();
title_layout0 -> addWidget(title_label_);
title_layout0 -> addWidget(title_value_);
main_layout0 -> addLayout(title_layout0);
@@ -255,7 +255,7 @@
*/
void ProjectAutoNumConfigPage::initWidgets()
{
- auto *tab_widget = new QTabWidget(this);
+ QTabWidget *tab_widget = new QTabWidget(this);
//Management tab
m_amw = new AutoNumberingManagementW(project());
@@ -277,7 +277,7 @@
m_faw = new FolioAutonumberingW(project());
tab_widget->addTab(m_faw, tr("Folio autonumérotation"));
- auto *main_layout = new QHBoxLayout();
+ QHBoxLayout *main_layout = new QHBoxLayout();
main_layout->addWidget(tab_widget);
setLayout(main_layout);
}
Modified: trunk/sources/projectview.cpp
===================================================================
--- trunk/sources/projectview.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/projectview.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -348,7 +348,7 @@
if (m_project -> isReadOnly()) return;
Diagram *new_diagram = m_project -> addNewDiagram();
- auto *new_diagram_view = new DiagramView(new_diagram);
+ DiagramView *new_diagram_view = new DiagramView(new_diagram);
addDiagram(new_diagram_view);
if (m_project -> diagrams().size() % 58 == 1 && m_project -> getFolioSheetsQuantity() != 0)
@@ -365,7 +365,7 @@
int i = 1; //< Each new diagram is added to the end of the project.
//< We use @i to move the folio list at second position in the project
foreach (Diagram *d, m_project -> addNewDiagramFolioList()) {
- auto *new_diagram_view = new DiagramView(d);
+ DiagramView *new_diagram_view = new DiagramView(d);
addDiagram(new_diagram_view);
showDiagram(new_diagram_view);
m_tab->tabBar()->moveTab(diagram_views().size()-1, i);
@@ -751,7 +751,7 @@
#endif
clean_dialog.setWindowTitle(tr("Nettoyer le projet", "window title"));
- auto *clean_dialog_layout = new QVBoxLayout();
+ QVBoxLayout *clean_dialog_layout = new QVBoxLayout();
clean_dialog_layout -> addWidget(clean_tbt);
clean_dialog_layout -> addWidget(clean_elements);
clean_dialog_layout -> addWidget(clean_categories);
@@ -807,7 +807,7 @@
m_tab = new QTabWidget(this);
m_tab -> setMovable(true);
- auto *add_new_diagram_button = new QToolButton;
+ QToolButton *add_new_diagram_button = new QToolButton;
add_new_diagram_button -> setDefaultAction(add_new_diagram_);
add_new_diagram_button -> setAutoRaise(true);
m_tab -> setCornerWidget(add_new_diagram_button, Qt::TopRightCorner);
@@ -824,7 +824,7 @@
Initialize layout for this widget.
*/
void ProjectView::initLayout() {
- auto *fallback_widget_layout_ = new QVBoxLayout(fallback_widget_);
+ QVBoxLayout *fallback_widget_layout_ = new QVBoxLayout(fallback_widget_);
fallback_widget_layout_ -> addWidget(fallback_label_);
layout_ = new QVBoxLayout(this);
@@ -868,7 +868,7 @@
dialog->setProgressBar(dialog->progressBarValue()+1);
}
- auto *sv = new DiagramView(diagram);
+ DiagramView *sv = new DiagramView(diagram);
addDiagram(sv);
}
Modified: trunk/sources/qet.cpp
===================================================================
--- trunk/sources/qet.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/qet.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -626,7 +626,7 @@
*/
QActionGroup *QET::depthActionGroup(QObject *parent)
{
- auto *action_group = new QActionGroup(parent);
+ QActionGroup *action_group = new QActionGroup(parent);
QAction *edit_forward = new QAction(QET::Icons::BringForward, QObject::tr("Amener au premier plan"), action_group);
QAction *edit_raise = new QAction(QET::Icons::Raise, QObject::tr("Rapprocher"), action_group);
Modified: trunk/sources/qetapp.cpp
===================================================================
--- trunk/sources/qetapp.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/qetapp.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -441,7 +441,7 @@
@return le nom de l'utilisateur courant
*/
QString QETApp::userName() {
- auto * process = new QProcess();
+ QProcess * process = new QProcess();
QString str;
#ifndef Q_OS_WIN32
// return(QString(getenv("USER")));
@@ -463,18 +463,18 @@
*/
QString QETApp::commonElementsDir()
{
-#ifndef Q_OS_MAC
- QSettings settings;
- QString path = settings.value("elements-collections/common-collection-path", "default").toString();
- if (path != "default" && !path.isEmpty())
- {
- QDir dir(path);
- if (dir.exists()) {
- return path;
- }
- }
-#endif
-
+ //@todo: fix me " Load time from elements is very slow "
+
+// QSettings settings;
+// QString path = settings.value("elements-collections/common-collection-path", "default").toString();
+// if (path != "default" && !path.isEmpty())
+// {
+// QDir dir(path);
+// if (dir.exists()) {
+// return path;
+// }
+// }
+
#ifdef QET_ALLOW_OVERRIDE_CED_OPTION
if (common_elements_dir != QString()) return(common_elements_dir);
#endif
@@ -498,17 +498,18 @@
*/
QString QETApp::customElementsDir()
{
-#ifndef Q_OS_MAC
- QSettings settings;
- QString path = settings.value("elements-collections/custom-collection-path", "default").toString();
- if (path != "default" && !path.isEmpty())
- {
- QDir dir(path);
- if (dir.exists()) {
- return path;
- }
- }
-#endif
+ //@todo: fix me " Load time from elements is very slow "
+
+// QSettings settings;
+// QString path = settings.value("elements-collections/custom-collection-path", "default").toString();
+// if (path != "default" && !path.isEmpty())
+// {
+// QDir dir(path);
+// if (dir.exists()) {
+// return path;
+// }
+// }
+
return(configDir() + "elements/");
}
@@ -931,7 +932,7 @@
@see QTextOrientationSpinBoxWidget
*/
QTextOrientationSpinBoxWidget *QETApp::createTextOrientationSpinBoxWidget() {
- auto *widget = new QTextOrientationSpinBoxWidget();
+ QTextOrientationSpinBoxWidget *widget = new QTextOrientationSpinBoxWidget();
widget -> orientationWidget() -> setFont(QETApp::diagramTextsFont());
widget -> orientationWidget() -> setUsableTexts(QList<QString>()
<< QETApp::tr("Q", "Single-letter example text - translate length, not meaning")
@@ -948,7 +949,7 @@
*/
TitleBlockTemplate *QETApp::defaultTitleBlockTemplate() {
if (!QETApp::default_titleblock_template_) {
- auto *titleblock_template = new TitleBlockTemplate(QETApp::instance());
+ TitleBlockTemplate *titleblock_template = new TitleBlockTemplate(QETApp::instance());
if (titleblock_template -> loadFromXmlFile(":/titleblocks/default.titleblock")) {
QETApp::default_titleblock_template_ = titleblock_template;
}
@@ -1058,7 +1059,7 @@
@param window fenetre a afficher / cacher
*/
void QETApp::invertMainWindowVisibility(QWidget *window) {
- if (auto *w = qobject_cast<QMainWindow *>(window)) setMainWindowVisible(w, !w -> isVisible());
+ if (QMainWindow *w = qobject_cast<QMainWindow *>(window)) setMainWindowVisible(w, !w -> isVisible());
}
/**
@@ -1230,7 +1231,7 @@
}
if (!already_opened_in_existing_element_editor) {
// ce fichier n'est ouvert dans aucun editeur
- auto *element_editor = new QETElementEditor();
+ QETElementEditor *element_editor = new QETElementEditor();
element_editor -> fromFile(element_file);
}
}
@@ -1262,7 +1263,7 @@
}
if (!already_opened_in_existing_element_editor) {
// cet emplacement n'est ouvert dans aucun editeur
- auto *element_editor = new QETElementEditor();
+ QETElementEditor *element_editor = new QETElementEditor();
element_editor -> fromLocation(element_location);
}
}
@@ -1277,7 +1278,7 @@
@see QETTitleBlockTemplateEditor::setOpenForDuplication()
*/
void QETApp::openTitleBlockTemplate(const TitleBlockTemplateLocation &location, bool duplicate) {
- auto *qet_template_editor = new QETTitleBlockTemplateEditor();
+ QETTitleBlockTemplateEditor *qet_template_editor = new QETTitleBlockTemplateEditor();
qet_template_editor -> setOpenForDuplication(duplicate);
qet_template_editor -> edit(location);
qet_template_editor -> show();
@@ -1288,7 +1289,7 @@
@param filepath Path of the .titleblock file to be opened
*/
void QETApp::openTitleBlockTemplate(const QString &filepath) {
- auto *qet_template_editor = new QETTitleBlockTemplateEditor();
+ QETTitleBlockTemplateEditor *qet_template_editor = new QETTitleBlockTemplateEditor();
qet_template_editor -> edit(filepath);
qet_template_editor -> show();
}
Modified: trunk/sources/qetdiagrameditor.cpp
===================================================================
--- trunk/sources/qetdiagrameditor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/qetdiagrameditor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -184,7 +184,7 @@
*/
void QETDiagramEditor::setUpUndoStack() {
- auto *undo_view = new QUndoView(&undo_group, this);
+ QUndoView *undo_view = new QUndoView(&undo_group, this);
undo_view -> setEmptyLabel (tr("Aucune modification"));
undo_view -> setStatusTip (tr("Cliquez sur une action pour revenir en arrière dans l'édition de votre schéma", "Status tip"));
@@ -849,7 +849,7 @@
*/
bool QETDiagramEditor::newProject() {
// create new project without diagram
- auto *new_project = new QETProject(0);
+ QETProject *new_project = new QETProject(0);
// Set default properties for new diagram
new_project -> setDefaultBorderProperties (BorderProperties:: defaultProperties());
@@ -1009,7 +1009,7 @@
//Create the project
DialogWaiting::instance(this);
- auto *project = new QETProject(filepath);
+ QETProject *project = new QETProject(filepath);
if (project -> state() != QETProject::Ok)
{
if (interactive && project -> state() != QETProject::FileOpenDiscard)
@@ -1048,7 +1048,7 @@
QETApp::registerProject(project);
// cree un ProjectView pour visualiser le projet
- auto *project_view = new ProjectView(project);
+ ProjectView *project_view = new ProjectView(project);
addProjectView(project_view);
undo_group.addStack(project -> undoStack());
@@ -1072,7 +1072,7 @@
QList<ProjectView *> result;
QList<QMdiSubWindow *> window_list(m_workspace.subWindowList());
foreach(QMdiSubWindow *window, window_list) {
- if (auto *project_view = qobject_cast<ProjectView *>(window -> widget())) {
+ if (ProjectView *project_view = qobject_cast<ProjectView *>(window -> widget())) {
result << project_view;
}
}
@@ -1090,7 +1090,7 @@
QWidget *current_widget = current_window -> widget();
if (!current_widget) return(nullptr);
- if (auto *project_view = qobject_cast<ProjectView *>(current_widget)) {
+ if (ProjectView *project_view = qobject_cast<ProjectView *>(current_widget)) {
return(project_view);
}
return(nullptr);
@@ -1284,7 +1284,7 @@
diagram_event = new DiagramEventAddShape (d, QetShapeItem::Polygon);
else if (value == "image")
{
- auto *deai = new DiagramEventAddImage(d);
+ DiagramEventAddImage *deai = new DiagramEventAddImage(d);
if (deai->isNull())
{
delete deai;
@@ -1326,7 +1326,7 @@
}
else if (value == "rotate_selection")
{
- auto *c = new RotateSelectionCommand(diagram);
+ RotateSelectionCommand *c = new RotateSelectionCommand(diagram);
if(c->isValid())
diagram->undoStack().push(c);
}
@@ -1697,7 +1697,7 @@
QWidget *current_widget = current_window -> widget();
if (!current_widget) return(nullptr);
- if (auto *project_view = qobject_cast<ProjectView *>(current_widget)) {
+ if (ProjectView *project_view = qobject_cast<ProjectView *>(current_widget)) {
return(project_view);
}
return(nullptr);
@@ -1752,7 +1752,7 @@
m_previous_window -> setEnabled(windows.count() > 1);
if (!windows.isEmpty()) windows_menu -> addSeparator();
- auto *windows_actions = new QActionGroup(this);
+ QActionGroup *windows_actions = new QActionGroup(this);
foreach(ProjectView *project_view, windows) {
QString pv_title = project_view -> windowTitle();
QAction *action = windows_menu -> addAction(pv_title);
@@ -2072,7 +2072,7 @@
// remove one (last) folio sheet.
} else if (current_project -> diagram_views().size() % 58 == 0) {
foreach (DiagramView *diag, current_project -> diagram_views()) {
- auto *ptr = dynamic_cast<DiagramFolioList *>(diag -> diagram());
+ DiagramFolioList *ptr = dynamic_cast<DiagramFolioList *>(diag -> diagram());
if (ptr && ptr -> getId() == current_project -> project() -> getFolioSheetsQuantity() - 1) {
current_project -> removeDiagram(diag);
}
@@ -2170,7 +2170,7 @@
void QETDiagramEditor::generateTerminalBlock()
{
bool success;
- auto *process = new QProcess(qApp);
+ QProcess *process = new QProcess(qApp);
// If launched under control:
//connect(process, SIGNAL(errorOcurred(int error)), this, SLOT(slot_generateTerminalBlock_error()));
Modified: trunk/sources/qetgraphicsitem/conductor.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/conductor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/qetgraphicsitem/conductor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -696,7 +696,7 @@
//Watched must be an handler
if(watched->type() == QetGraphicsHandlerItem::Type)
{
- auto *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
+ QetGraphicsHandlerItem *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
if(m_handler_vector.contains(qghi)) //Handler must be in m_vector_index, then we can start resize
{
@@ -1352,7 +1352,7 @@
conductor_profiles[current_path_type].fromConductor(this);
Diagram *dia = diagram();
if (undo && dia) {
- auto *undo_object = new ChangeConductorCommand(
+ ChangeConductorCommand *undo_object = new ChangeConductorCommand(
this,
old_profile,
conductor_profiles[current_path_type],
Modified: trunk/sources/qetgraphicsitem/conductortextitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/conductortextitem.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/qetgraphicsitem/conductortextitem.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -205,7 +205,7 @@
if (!applied_movement.isNull()) {
//Create an undo object
- auto *undo_object = new MoveConductorsTextsCommand(diagram_ptr);
+ MoveConductorsTextsCommand *undo_object = new MoveConductorsTextsCommand(diagram_ptr);
undo_object -> addTextMovement(this, before_mov_pos_, pos(), moved_by_user_);
moved_by_user_ = true;
Modified: trunk/sources/qetgraphicsitem/customelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/customelement.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/qetgraphicsitem/customelement.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -370,7 +370,7 @@
if (addtolist){
//Add line to the list
- auto *newLine = new QLineF(line);
+ QLineF *newLine = new QLineF(line);
m_lines << newLine;
}
@@ -475,7 +475,7 @@
if (addtolist){
//Add rectangle to the list
- auto *rect = new QRectF(rect_x, rect_y, rect_w, rect_h);
+ QRectF *rect = new QRectF(rect_x, rect_y, rect_w, rect_h);
m_rectangles << rect;
}
@@ -516,7 +516,7 @@
if (addtolist){
// Add circle to list
- auto *circle = new QRectF(circle_bounding_rect);
+ QRectF *circle = new QRectF(circle_bounding_rect);
m_circles << circle;
}
@@ -549,7 +549,7 @@
setPainterStyle(e, qp);
if (addtolist){
- auto *arc = new QVector<qreal>;
+ QVector<qreal> *arc = new QVector<qreal>;
arc -> push_back(ellipse_x);
arc -> push_back(ellipse_y);
arc -> push_back(ellipse_l);
@@ -592,7 +592,7 @@
setPainterStyle(e, qp);
if (addtolist){
- auto *arc = new QVector<qreal>;
+ QVector<qreal> *arc = new QVector<qreal>;
arc -> push_back(arc_x);
arc -> push_back(arc_y);
arc -> push_back(arc_l);
@@ -647,7 +647,7 @@
}
if (addtolist){
// Add to list of polygons.
- auto *poly = new QVector<QPointF>(points);
+ QVector<QPointF> *poly = new QVector<QPointF>(points);
m_polygons << poly;
}
@@ -743,7 +743,7 @@
) return(false);
else
{
- auto *deti = new DynamicElementTextItem(this);
+ DynamicElementTextItem *deti = new DynamicElementTextItem(this);
deti->setText(dom_element.attribute("text", "_"));
deti->setFontSize(dom_element.attribute("size", QString::number(9)).toInt());
deti->setRotation(dom_element.attribute("rotation", QString::number(0)).toDouble());
@@ -782,7 +782,7 @@
*/
DynamicElementTextItem *CustomElement::parseDynamicText(QDomElement &dom_element)
{
- auto *deti = new DynamicElementTextItem(this);
+ DynamicElementTextItem *deti = new DynamicElementTextItem(this);
//Because the xml description of a .elmt file is the same as how a dynamic text field is save to xml in a .qet file
//wa call fromXml, we just change the tagg name (.elmt = dynamic_text, .qet = dynamic_elmt_text)
//and the uuid (because the uuid, is the uuid of the descritpion and not the uuid of instantiated dynamic text field)
@@ -817,7 +817,7 @@
else if (e.attribute("orientation") == "e") terminalo = Qet::East;
else if (e.attribute("orientation") == "w") terminalo = Qet::West;
else return(nullptr);
- auto *new_terminal = new Terminal(terminalx, terminaly, terminalo, this);
+ Terminal *new_terminal = new Terminal(terminalx, terminaly, terminalo, this);
m_terminals << new_terminal;
//Sort from top to bottom and left to rigth
Modified: trunk/sources/qetgraphicsitem/dynamicelementtextitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/dynamicelementtextitem.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/qetgraphicsitem/dynamicelementtextitem.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -218,7 +218,7 @@
{
if(parentItem())
{
- if(auto *grp = dynamic_cast<ElementTextItemGroup *>(parentItem()))
+ if(ElementTextItemGroup *grp = dynamic_cast<ElementTextItemGroup *>(parentItem()))
return grp;
}
Modified: trunk/sources/qetgraphicsitem/element.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/element.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/qetgraphicsitem/element.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -78,7 +78,7 @@
connect(this, &Element::rotationChanged, [this]() {
for(QGraphicsItem *qgi : childItems())
{
- if (auto *t = qgraphicsitem_cast<Terminal *>(qgi))
+ if (Terminal *t = qgraphicsitem_cast<Terminal *>(qgi))
t->updateConductor();
}
});
@@ -96,7 +96,7 @@
{
if (diagram() && !diagram()->isReadOnly())
{
- auto *epw = new ElementPropertiesWidget(this);
+ ElementPropertiesWidget *epw = new ElementPropertiesWidget(this);
PropertiesEditorDialog dialog(epw, QApplication::activeWindow());
connect(epw, &ElementPropertiesWidget::findEditClicked, &dialog, &QDialog::reject);
//Must be windowModal, else when user do a drag and drop
@@ -370,7 +370,7 @@
QHash<int, Terminal *> priv_id_adr;
int terminals_non_trouvees = 0;
foreach(QGraphicsItem *qgi, childItems()) {
- if (auto *p = qgraphicsitem_cast<Terminal *>(qgi)) {
+ if (Terminal *p = qgraphicsitem_cast<Terminal *>(qgi)) {
bool terminal_trouvee = false;
foreach(QDomElement qde, liste_terminals) {
if (p -> fromXml(qde)) {
@@ -454,7 +454,7 @@
//************************//
for (const QDomElement& qde : QET::findInDomElement(e, "dynamic_texts", DynamicElementTextItem::xmlTaggName()))
{
- auto *deti = new DynamicElementTextItem(this);
+ DynamicElementTextItem *deti = new DynamicElementTextItem(this);
addDynamicTextItem(deti);
deti->fromXml(qde);
}
@@ -856,7 +856,7 @@
}
else
{
- auto *text = new DynamicElementTextItem(this);
+ DynamicElementTextItem *text = new DynamicElementTextItem(this);
m_dynamic_text_list.append(text);
emit textAdded(text);
}
@@ -911,7 +911,7 @@
{
if(m_texts_group.isEmpty())
{
- auto *group = new ElementTextItemGroup(name, this);
+ ElementTextItemGroup *group = new ElementTextItemGroup(name, this);
m_texts_group << group;
emit textsGroupAdded(group);
return group;
@@ -927,7 +927,7 @@
}
//Create the group
- auto *group = new ElementTextItemGroup(rename, this);
+ ElementTextItemGroup *group = new ElementTextItemGroup(rename, this);
m_texts_group << group;
emit textsGroupAdded(group);
return group;
@@ -966,7 +966,7 @@
{
if(qgi->type() == DynamicElementTextItem::Type)
{
- auto *deti = static_cast<DynamicElementTextItem *>(qgi);
+ DynamicElementTextItem *deti = static_cast<DynamicElementTextItem *>(qgi);
removeTextFromGroup(deti, group);
}
}
Modified: trunk/sources/qetgraphicsitem/elementtextitemgroup.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/elementtextitemgroup.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/qetgraphicsitem/elementtextitemgroup.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -66,7 +66,7 @@
QGraphicsItemGroup::addToGroup(item);
updateAlignment();
- auto *deti = qgraphicsitem_cast<DynamicElementTextItem *>(item);
+ DynamicElementTextItem *deti = qgraphicsitem_cast<DynamicElementTextItem *>(item);
connect(deti, &DynamicElementTextItem::fontSizeChanged, this, &ElementTextItemGroup::updateAlignment);
connect(deti, &DynamicElementTextItem::textChanged, this, &ElementTextItemGroup::updateAlignment);
connect(deti, &DynamicElementTextItem::textFromChanged, this, &ElementTextItemGroup::updateAlignment);
@@ -96,7 +96,7 @@
item->setFlag(QGraphicsItem::ItemIsSelectable, true);
updateAlignment();
- if(auto *deti = qgraphicsitem_cast<DynamicElementTextItem *>(item))
+ if(DynamicElementTextItem *deti = qgraphicsitem_cast<DynamicElementTextItem *>(item))
{
disconnect(deti, &DynamicElementTextItem::fontSizeChanged, this, &ElementTextItemGroup::updateAlignment);
disconnect(deti, &DynamicElementTextItem::textChanged, this, &ElementTextItemGroup::updateAlignment);
@@ -780,7 +780,7 @@
if(!diagram())
return;
- auto *master = static_cast<MasterElement *>(m_parent_element);
+ MasterElement *master = static_cast<MasterElement *>(m_parent_element);
XRefProperties xrp = diagram()->project()->defaultXRefProperties(master->kindInformations()["type"].toString());
if(xrp.snapTo() == XRefProperties::Bottom)
{
Modified: trunk/sources/qetgraphicsitem/qetshapeitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/qetshapeitem.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/qetgraphicsitem/qetshapeitem.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -408,7 +408,7 @@
//Watched must be an handler
if(watched->type() == QetGraphicsHandlerItem::Type)
{
- auto *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
+ QetGraphicsHandlerItem *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
if(m_handler_vector.contains(qghi)) //Handler must be in m_vector_index, then we can start resize
{
Modified: trunk/sources/qetgraphicsitem/terminal.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/terminal.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/qetgraphicsitem/terminal.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -150,7 +150,7 @@
@return L'orientation actuelle de la Terminal.
*/
Qet::Orientation Terminal::orientation() const {
- if (auto *elt = qgraphicsitem_cast<Element *>(parentItem())) {
+ if (Element *elt = qgraphicsitem_cast<Element *>(parentItem())) {
// orientations actuelle et par defaut de l'element
int ori_cur = elt -> orientation();
if (ori_cur == 0) return(ori_);
@@ -431,7 +431,7 @@
QList <Terminal *> available_terminals;
foreach (QGraphicsItem *qgi, qgi_list)
{
- if (auto *tt = qgraphicsitem_cast <Terminal *> (qgi))
+ if (Terminal *tt = qgraphicsitem_cast <Terminal *> (qgi))
{
//Call QET::lineContainsPoint to be sure the line intersect
//the dock point and not an other part of terminal
@@ -539,7 +539,7 @@
// sinon on prend le deuxieme element de la liste et on verifie s'il s'agit d'une borne
QGraphicsItem *qgi = qgis.at(1);
// si le qgi est une borne...
- auto *other_terminal = qgraphicsitem_cast<Terminal *>(qgi);
+ Terminal *other_terminal = qgraphicsitem_cast<Terminal *>(qgi);
if (!other_terminal) return;
previous_terminal_ = other_terminal;
@@ -576,7 +576,7 @@
if (!qgi) return;
//Element must be a terminal
- auto *other_terminal = qgraphicsitem_cast<Terminal *>(qgi);
+ Terminal *other_terminal = qgraphicsitem_cast<Terminal *>(qgi);
if (!other_terminal) return;
other_terminal -> hovered_color_ = neutralColor;
@@ -586,7 +586,7 @@
if (!canBeLinkedTo(other_terminal)) return;
//Create conductor
- auto *new_conductor = new Conductor(this, other_terminal);
+ Conductor *new_conductor = new Conductor(this, other_terminal);
//Get all conductors at the same potential of new conductors
QSet <Conductor *> conductors_list = new_conductor->relatedPotentialConductors();
@@ -606,7 +606,7 @@
}
- auto *undo = new QUndoCommand();
+ QUndoCommand *undo = new QUndoCommand();
QUndoCommand *aic = new AddItemCommand<Conductor *>(new_conductor, diagram(), QPointF(), undo);
undo->setText(aic->text());
Modified: trunk/sources/qetprintpreviewdialog.cpp
===================================================================
--- trunk/sources/qetprintpreviewdialog.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/qetprintpreviewdialog.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -392,7 +392,7 @@
void QETPrintPreviewDialog::updateZoomList() {
// recupere le zooom courant
qreal current_zoom = preview_ -> zoomFactor();
- auto current_zoom_is_not_null = bool(int(current_zoom * 100.0));
+ bool current_zoom_is_not_null = bool(int(current_zoom * 100.0));
// liste des zooms par defaut
QList<qreal> zooms_real;
Modified: trunk/sources/qetproject.cpp
===================================================================
--- trunk/sources/qetproject.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/qetproject.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -817,7 +817,7 @@
for(Diagram *diagram : diagrams_list)
{
// Write the diagram to XML only if it is not of type DiagramFolioList.
- auto *ptr = dynamic_cast<DiagramFolioList *>(diagram);
+ DiagramFolioList *ptr = dynamic_cast<DiagramFolioList *>(diagram);
if ( !ptr )
{
qDebug() << qPrintable(QString("QETProject::toXml() : exporting diagram \"%1\"").arg(diagram -> title())) << "[" << diagram << "]";
@@ -1099,7 +1099,7 @@
if (isReadOnly()) return(nullptr);
// cree un nouveau schema
- auto *diagram = new Diagram(this);
+ Diagram *diagram = new Diagram(this);
// lui transmet les parametres par defaut
diagram -> border_and_titleblock.importBorder(defaultBorderProperties());
@@ -1325,7 +1325,7 @@
if (diagram_nodes.at(i).isElement())
{
QDomElement diagram_xml_element = diagram_nodes.at(i).toElement();
- auto *diagram = new Diagram(this);
+ Diagram *diagram = new Diagram(this);
bool diagram_loading = diagram -> initFromXml(diagram_xml_element);
if (diagram_loading)
{
Modified: trunk/sources/qtextorientationspinboxwidget.cpp
===================================================================
--- trunk/sources/qtextorientationspinboxwidget.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/qtextorientationspinboxwidget.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -117,7 +117,7 @@
connect(spin_box_, SIGNAL(editingFinished()), this, SLOT(emitChangeSignals()));
// dispose les widgets : le QTextOrientationWidget a gauche, le SpinBox a droite
- auto *main_layout = new QHBoxLayout();
+ QHBoxLayout *main_layout = new QHBoxLayout();
main_layout -> addWidget(orientation_widget_);
main_layout -> addWidget(spin_box_);
main_layout -> addStretch();
Modified: trunk/sources/recentfiles.cpp
===================================================================
--- trunk/sources/recentfiles.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/recentfiles.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -175,7 +175,7 @@
// remplit le menu
foreach (QString filepath, list_) {
// creee une nouvelle action pour le fichier
- auto *action = new QAction(filepath, this);
+ QAction *action = new QAction(filepath, this);
if (!files_icon_.isNull()) {
action -> setIcon(files_icon_);
}
Modified: trunk/sources/richtext/richtexteditor.cpp
===================================================================
--- trunk/sources/richtext/richtexteditor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/richtext/richtexteditor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -417,7 +417,7 @@
QObject *receiver, const char *slot,
QObject *parent = nullptr)
{
- auto *result = new QAction(parent);
+ QAction *result = new QAction(parent);
result->setIcon(icon);
result->setText(text);
result->setCheckable(true);
@@ -471,7 +471,7 @@
// Left, center, right and justified alignment buttons
- auto *alignment_group = new QActionGroup(this);
+ QActionGroup *alignment_group = new QActionGroup(this);
connect(alignment_group, SIGNAL(triggered(QAction*)),
SLOT(alignmentActionTriggered(QAction*)));
@@ -767,12 +767,12 @@
tool_bar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
QWidget *rich_edit = new QWidget;
- auto *rich_edit_layout = new QVBoxLayout(rich_edit);
+ QVBoxLayout *rich_edit_layout = new QVBoxLayout(rich_edit);
rich_edit_layout->addWidget(tool_bar);
rich_edit_layout->addWidget(m_editor);
QWidget *plain_edit = new QWidget;
- auto *plain_edit_layout = new QVBoxLayout(plain_edit);
+ QVBoxLayout *plain_edit_layout = new QVBoxLayout(plain_edit);
plain_edit_layout->addWidget(m_text_edit);
m_tab_widget->setTabPosition(QTabWidget::South);
@@ -789,7 +789,7 @@
connect(buttonBox, SIGNAL(accepted()), this, SLOT(on_buttonBox_accepted()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
- auto *layout = new QVBoxLayout(this);
+ QVBoxLayout *layout = new QVBoxLayout(this);
layout->addWidget(m_tab_widget);
layout->addWidget(buttonBox);
Modified: trunk/sources/titleblock/dimensionwidget.cpp
===================================================================
--- trunk/sources/titleblock/dimensionwidget.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/titleblock/dimensionwidget.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -145,10 +145,10 @@
Initialize the layout of the dialog.
*/
void TitleBlockDimensionWidget::initLayouts() {
- auto *hlayout0 = new QHBoxLayout();
+ QHBoxLayout *hlayout0 = new QHBoxLayout();
hlayout0 -> addWidget(spinbox_label_);
hlayout0 -> addWidget(spinbox_);
- auto *vlayout0 = new QVBoxLayout();
+ QVBoxLayout *vlayout0 = new QVBoxLayout();
vlayout0 -> addLayout(hlayout0);
if (complete_) {
vlayout0 -> addWidget(absolute_button_);
Modified: trunk/sources/titleblock/qettemplateeditor.cpp
===================================================================
--- trunk/sources/titleblock/qettemplateeditor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/titleblock/qettemplateeditor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -246,7 +246,7 @@
*/
bool QETTitleBlockTemplateEditor::edit(const QString &file_path) {
// get title block template object from the file, edit it
- auto *tbt = new TitleBlockTemplate();
+ TitleBlockTemplate *tbt = new TitleBlockTemplate();
bool loading = tbt -> loadFromXmlFile(file_path);
if (!loading) {
/// TODO the file opening failed, warn the user?
@@ -301,7 +301,7 @@
logo_manager_ -> layout() -> setContentsMargins(0, 0, 0, 0);
QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Close);
- auto *vlayout0 = new QVBoxLayout();
+ QVBoxLayout *vlayout0 = new QVBoxLayout();
vlayout0 -> addWidget(logo_manager_);
vlayout0 -> addWidget(buttons);
@@ -320,7 +320,7 @@
Launch a new title block template editor.
*/
void QETTitleBlockTemplateEditor::newTemplate() {
- auto *qet_template_editor = new QETTitleBlockTemplateEditor();
+ QETTitleBlockTemplateEditor *qet_template_editor = new QETTitleBlockTemplateEditor();
qet_template_editor -> edit(TitleBlockTemplateLocation());
qet_template_editor -> show();
}
@@ -882,7 +882,7 @@
}
QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
- auto *dialog_layout = new QVBoxLayout();
+ QVBoxLayout *dialog_layout = new QVBoxLayout();
dialog_layout -> addWidget(widget);
dialog_layout -> addWidget(buttons);
@@ -932,7 +932,7 @@
#endif
dialog_author.setMinimumSize(400, 260);
dialog_author.setWindowTitle(tr("Éditer les informations complémentaires", "window title"));
- auto *dialog_layout = new QVBoxLayout(&dialog_author);
+ QVBoxLayout *dialog_layout = new QVBoxLayout(&dialog_author);
// explanation label
QLabel *information_label = new QLabel(tr("Vous pouvez utiliser ce champ libre pour mentionner les auteurs du cartouche, sa licence, ou tout autre renseignement que vous jugerez utile."));
@@ -941,7 +941,7 @@
dialog_layout -> addWidget(information_label);
// add a QTextEdit to the dialog
- auto *text_field = new QTextEdit();
+ QTextEdit *text_field = new QTextEdit();
text_field -> setAcceptRichText(false);
text_field -> setPlainText(tb_template_ -> information());
text_field -> setReadOnly(read_only_);
Modified: trunk/sources/titleblock/templatecellwidget.cpp
===================================================================
--- trunk/sources/titleblock/templatecellwidget.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/titleblock/templatecellwidget.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -96,11 +96,11 @@
font_adjust_input_ = new QCheckBox(tr("Ajuster la taille de police si besoin"));
// layout
- auto *label_edition = new QHBoxLayout();
+ QHBoxLayout *label_edition = new QHBoxLayout();
label_edition -> addWidget(label_input_);
label_edition -> addWidget(label_edit_);
- auto *value_edition = new QHBoxLayout();
+ QHBoxLayout *value_edition = new QHBoxLayout();
value_edition -> addWidget(value_input_);
value_edition -> addWidget(value_edit_);
@@ -375,7 +375,7 @@
@param title Title of the dialog window
*/
void TitleBlockTemplateCellWidget::editTranslatableValue(NamesList &names, const QString &attribute, const QString &title) const {
- auto *names_widget = new NamesListWidget();
+ NamesListWidget *names_widget = new NamesListWidget();
names_widget -> setNames(names);
QDialogButtonBox * buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
@@ -386,7 +386,7 @@
QLabel *def_var_label = new QLabel(defaultVariablesString());
def_var_label -> setTextFormat(Qt::RichText);
- auto *editor_layout = new QVBoxLayout();
+ QVBoxLayout *editor_layout = new QVBoxLayout();
editor_layout -> addWidget(information);
editor_layout -> addWidget(names_widget);
editor_layout -> addWidget(def_var_label);
@@ -416,7 +416,7 @@
// avoid creating a QUndoCommand object when no modification was actually done
if (edited_cell_ -> attribute(attribute) == new_value) return;
- auto *command = new ModifyTitleBlockCellCommand(edited_cell_);
+ ModifyTitleBlockCellCommand *command = new ModifyTitleBlockCellCommand(edited_cell_);
command -> addModification(attribute, new_value);
command -> setText(
tr("Édition d'une cellule : %1", "label of and undo command when editing a cell")
Modified: trunk/sources/titleblock/templatecommands.cpp
===================================================================
--- trunk/sources/titleblock/templatecommands.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/titleblock/templatecommands.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -55,7 +55,7 @@
@return true on success, false otherwise
*/
bool ModifyTitleBlockCellCommand::mergeWith(const QUndoCommand *command) {
- const auto *other = static_cast<const ModifyTitleBlockCellCommand *>(command);
+ const ModifyTitleBlockCellCommand *other = static_cast<const ModifyTitleBlockCellCommand *>(command);
if (other) {
if (other -> modified_cell_ == modified_cell_) {
if (other -> new_values_.keys() == new_values_.keys()) {
@@ -226,7 +226,7 @@
if (!tbtemplate) return(nullptr);
// create the command itself
- auto *add_row_command = new ModifyTemplateGridCommand(tbtemplate);
+ ModifyTemplateGridCommand *add_row_command = new ModifyTemplateGridCommand(tbtemplate);
add_row_command -> setInsertion(true);
add_row_command -> setType(true);
add_row_command -> setCells(tbtemplate -> createRow());
@@ -247,7 +247,7 @@
if (!tbtemplate) return(nullptr);
// create the command itself
- auto *add_column_command = new ModifyTemplateGridCommand(tbtemplate);
+ ModifyTemplateGridCommand *add_column_command = new ModifyTemplateGridCommand(tbtemplate);
add_column_command -> setInsertion(true);
add_column_command -> setType(false);
add_column_command -> setCells(tbtemplate -> createColumn());
@@ -268,7 +268,7 @@
if (!tbtemplate) return(nullptr);
// create the command itself
- auto *del_row_command = new ModifyTemplateGridCommand(tbtemplate);
+ ModifyTemplateGridCommand *del_row_command = new ModifyTemplateGridCommand(tbtemplate);
del_row_command -> setInsertion(false);
del_row_command -> setType(true);
del_row_command -> setIndex(index);
@@ -287,7 +287,7 @@
if (!tbtemplate) return(nullptr);
// create the command itself
- auto *del_column_command = new ModifyTemplateGridCommand(tbtemplate);
+ ModifyTemplateGridCommand *del_column_command = new ModifyTemplateGridCommand(tbtemplate);
del_column_command -> setInsertion(false);
del_column_command -> setType(false);
del_column_command -> setIndex(index);
Modified: trunk/sources/titleblock/templatelogomanager.cpp
===================================================================
--- trunk/sources/titleblock/templatelogomanager.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/titleblock/templatelogomanager.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -154,7 +154,7 @@
current_icon = QIcon(*svg_pixmap);
}
}
- auto *qlwi = new QListWidgetItem(current_icon, logo_name);
+ QListWidgetItem *qlwi = new QListWidgetItem(current_icon, logo_name);
qlwi -> setTextAlignment(Qt::AlignBottom | Qt::AlignHCenter);
logos_view_ -> insertItem(0, qlwi);
}
@@ -192,18 +192,18 @@
rd_label = new QLabel();
rd_label -> setWordWrap(true);
rd_input = new QLineEdit();
- auto *rd_buttons = new QDialogButtonBox();
+ QDialogButtonBox *rd_buttons = new QDialogButtonBox();
QPushButton *replace_button = rd_buttons -> addButton(tr("Remplacer"), QDialogButtonBox::YesRole);
QPushButton *rename_button = rd_buttons -> addButton(tr("Renommer"), QDialogButtonBox::NoRole);
QPushButton *cancel_button = rd_buttons -> addButton(QDialogButtonBox::Cancel);
- auto *rd_vlayout0 = new QVBoxLayout();
+ QVBoxLayout *rd_vlayout0 = new QVBoxLayout();
rd_vlayout0 -> addWidget(rd_label);
rd_vlayout0 -> addWidget(rd_input);
rd_vlayout0 -> addWidget(rd_buttons);
rename_dialog -> setLayout(rd_vlayout0);
- auto *signal_mapper = new QSignalMapper(rename_dialog);
+ QSignalMapper *signal_mapper = new QSignalMapper(rename_dialog);
signal_mapper -> setMapping(replace_button, QDialogButtonBox::YesRole);
signal_mapper -> setMapping(rename_button, QDialogButtonBox::NoRole);
signal_mapper -> setMapping(cancel_button, QDialogButtonBox::RejectRole);
Modified: trunk/sources/titleblock/templatescollection.cpp
===================================================================
--- trunk/sources/titleblock/templatescollection.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/titleblock/templatescollection.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -199,7 +199,7 @@
}
// Ok, we have its XML description, we have to generate a TitleBlockTemplate object
- auto *titleblock_template = new TitleBlockTemplate(this);
+ TitleBlockTemplate *titleblock_template = new TitleBlockTemplate(this);
if (titleblock_template -> loadFromXmlElement(titleblock_templates_xml_[template_name])) {
titleblock_templates_.insert(template_name, titleblock_template);
return(titleblock_template);
@@ -403,7 +403,7 @@
TitleBlockTemplate *TitleBlockTemplatesFilesCollection::getTemplate(const QString &template_name) {
if (!templates().contains(template_name)) return(nullptr);
- auto *tbtemplate = new TitleBlockTemplate();
+ TitleBlockTemplate *tbtemplate = new TitleBlockTemplate();
QString tbt_file_path = path(template_name);
bool loading = tbtemplate -> loadFromXmlFile(tbt_file_path);
@@ -431,7 +431,7 @@
return(QDomElement());
}
- auto *xml_document = new QDomDocument();
+ QDomDocument *xml_document = new QDomDocument();
bool xml_parsing = xml_document -> setContent(&xml_file);
if (!xml_parsing) {
delete xml_document;
Modified: trunk/sources/titleblock/templateview.cpp
===================================================================
--- trunk/sources/titleblock/templateview.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/titleblock/templateview.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -140,7 +140,7 @@
QList<TitleBlockCell *> copied_cells = copy();
if (!copied_cells.isEmpty()) {
- auto *cut_command = new CutTemplateCellsCommand(tbtemplate_);
+ CutTemplateCellsCommand *cut_command = new CutTemplateCellsCommand(tbtemplate_);
cut_command -> setCutCells(copied_cells);
requestGridModification(cut_command);
}
@@ -247,7 +247,7 @@
// change num_row and num_col attributes of pasted cells so they get positionned relatively to selected_cell
normalizeCells(pasted_cells, erased_cell -> num_row, erased_cell -> num_col);
- auto *paste_command = new PasteTemplateCellsCommand(tbtemplate_);
+ PasteTemplateCellsCommand *paste_command = new PasteTemplateCellsCommand(tbtemplate_);
foreach (TitleBlockCell cell, pasted_cells) {
TitleBlockCell *erased_cell = tbtemplate_ -> cell(cell.num_row, cell.num_col);
if (!erased_cell) continue;
@@ -334,7 +334,7 @@
dialog.setValue(dimension_before);
int user_answer = dialog.exec();
if (!read_only_ && user_answer == QDialog::Accepted) {
- auto *command = new ModifyTemplateDimension(tbtemplate_);
+ ModifyTemplateDimension *command = new ModifyTemplateDimension(tbtemplate_);
command -> setType(false);
command -> setIndex(index);
command -> setDimensionBefore(dimension_before);
@@ -360,7 +360,7 @@
dialog.setValue(dimension_before);
int user_answer = dialog.exec();
if (!read_only_ && user_answer == QDialog::Accepted) {
- auto *command = new ModifyTemplateDimension(tbtemplate_);
+ ModifyTemplateDimension *command = new ModifyTemplateDimension(tbtemplate_);
command -> setType(true);
command -> setIndex(index);
command -> setDimensionBefore(dimension_before);
@@ -394,7 +394,7 @@
// retrieve the selected cells
TitleBlockTemplateCellsSet selected_cells = selectedCellsSet();
- auto *merge_command = new MergeCellsCommand(selected_cells, tbtemplate_);
+ MergeCellsCommand *merge_command = new MergeCellsCommand(selected_cells, tbtemplate_);
if (merge_command -> isValid()) requestGridModification(merge_command);
}
@@ -405,7 +405,7 @@
// retrieve the selected cells
TitleBlockTemplateCellsSet selected_cells = selectedCellsSet();
- auto *split_command = new SplitCellsCommand(selected_cells, tbtemplate_);
+ SplitCellsCommand *split_command = new SplitCellsCommand(selected_cells, tbtemplate_);
if (split_command -> isValid()) requestGridModification(split_command);
}
@@ -578,7 +578,7 @@
// no animation on first call
tbgrid_ -> setColumnFixedWidth(COL_OFFSET + i, widths.at(i));
} else {
- auto *animation = new GridLayoutAnimation(tbgrid_, form_);
+ GridLayoutAnimation *animation = new GridLayoutAnimation(tbgrid_, form_);
animation -> setIndex(COL_OFFSET + i);
animation -> setActsOnRows(false);
animation -> setStartValue(QVariant(tbgrid_ -> columnMinimumWidth(COL_OFFSET + i)));
@@ -643,7 +643,7 @@
// no animation on first call
tbgrid_ -> setRowFixedHeight(ROW_OFFSET + i, heights.at(i));
} else {
- auto *animation = new GridLayoutAnimation(tbgrid_, form_);
+ GridLayoutAnimation *animation = new GridLayoutAnimation(tbgrid_, form_);
animation -> setIndex(ROW_OFFSET + i);
animation -> setActsOnRows(true);
animation -> setStartValue(QVariant(tbgrid_ -> rowMinimumHeight(ROW_OFFSET + i)));
@@ -665,7 +665,7 @@
int row_count = tbtemplate_ -> rowsCount();
QList<int> heights = tbtemplate_ -> rowsHeights();
for (int i = 0 ; i < row_count ; ++ i) {
- auto *current_row_cell = static_cast<HelperCell *>(tbgrid_ -> itemAt(ROW_OFFSET + i, 0));
+ HelperCell *current_row_cell = static_cast<HelperCell *>(tbgrid_ -> itemAt(ROW_OFFSET + i, 0));
if (current_row_cell) {
current_row_cell -> setType(QET::Absolute); // rows always have absolute heights
current_row_cell -> setLabel(QString(tr("%1px", "format displayed in rows helper cells")).arg(heights.at(i)));
@@ -680,7 +680,7 @@
int col_count = tbtemplate_ -> columnsCount();
for (int i = 0 ; i < col_count ; ++ i) {
TitleBlockDimension current_col_dim = tbtemplate_ -> columnDimension(i);
- auto *current_col_cell = static_cast<HelperCell *>(tbgrid_ -> itemAt(1, COL_OFFSET + i));
+ HelperCell *current_col_cell = static_cast<HelperCell *>(tbgrid_ -> itemAt(1, COL_OFFSET + i));
if (current_col_cell) {
current_col_cell -> setType(current_col_dim.type);
current_col_cell -> setLabel(current_col_dim.toString());
@@ -714,7 +714,7 @@
// we add one cell per column to show their respective width
for (int i = 0 ; i < col_count ; ++ i) {
TitleBlockDimension current_col_dim = tbtemplate_ -> columnDimension(i);
- auto *current_col_cell = new HelperCell();
+ HelperCell *current_col_cell = new HelperCell();
current_col_cell -> setType(current_col_dim.type);
current_col_cell -> setLabel(current_col_dim.toString());
current_col_cell -> setActions(columnsActions());
@@ -728,7 +728,7 @@
// we add one cell per row to show their respective height
QList<int> heights = tbtemplate_ -> rowsHeights();
for (int i = 0 ; i < row_count ; ++ i) {
- auto *current_row_cell = new HelperCell();
+ HelperCell *current_row_cell = new HelperCell();
current_row_cell -> setType(QET::Absolute); // rows always have absolute heights
current_row_cell -> setLabel(QString(tr("%1px")).arg(heights.at(i)));
current_row_cell -> orientation = Qt::Vertical;
@@ -744,7 +744,7 @@
for (int j = 0 ; j < row_count ; ++ j) {
TitleBlockCell *cell = tbtemplate_ -> cell(j, i);
if (cell -> spanner_cell) continue;
- auto *cell_item = new TitleBlockTemplateVisualCell();
+ TitleBlockTemplateVisualCell *cell_item = new TitleBlockTemplateVisualCell();
cell_item -> setTemplateCell(tbtemplate_, cell);
int row_span = 0, col_span = 0;
@@ -768,7 +768,7 @@
for (int i = 0 ; i < col_count ; ++ i) {
for (int j = 0 ; j < row_count ; ++ j) {
if (QGraphicsLayoutItem *item = tbgrid_ -> itemAt(ROW_OFFSET + j, COL_OFFSET + i)) {
- if (auto *qgi = dynamic_cast<QGraphicsItem *>(item)) {
+ if (QGraphicsItem *qgi = dynamic_cast<QGraphicsItem *>(item)) {
qgi -> update();
}
}
@@ -800,7 +800,7 @@
for (int i = 0 ; i < col_count ; ++ i) {
for (int j = 0 ; j < row_count ; ++ j) {
if (tbgrid_ -> itemAt(ROW_OFFSET + j, COL_OFFSET + i)) continue;
- auto *cell_item = new TitleBlockTemplateVisualCell();
+ TitleBlockTemplateVisualCell *cell_item = new TitleBlockTemplateVisualCell();
if (TitleBlockCell *target_cell = tbtemplate_ -> cell(j, i)) {
qDebug() << Q_FUNC_INFO << "target_cell" << target_cell;
cell_item -> setTemplateCell(tbtemplate_, target_cell);
@@ -1057,7 +1057,7 @@
TitleBlockTemplateCellsSet TitleBlockTemplateView::makeCellsSetFromGraphicsItems(const QList<QGraphicsItem *> &items) const {
TitleBlockTemplateCellsSet set(this);
foreach (QGraphicsItem *item, items) {
- if (auto *cell_view = dynamic_cast<TitleBlockTemplateVisualCell *>(item)) {
+ if (TitleBlockTemplateVisualCell *cell_view = dynamic_cast<TitleBlockTemplateVisualCell *>(item)) {
if (cell_view -> cell() && cell_view -> cell() -> num_row != -1) {
set << cell_view;
}
Modified: trunk/sources/titleblocktemplate.cpp
===================================================================
--- trunk/sources/titleblocktemplate.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/titleblocktemplate.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -167,7 +167,7 @@
cells are duplicated too and associated with their parent template).
*/
TitleBlockTemplate *TitleBlockTemplate::clone() const {
- auto *copy = new TitleBlockTemplate();
+ TitleBlockTemplate *copy = new TitleBlockTemplate();
copy -> name_ = name_;
copy -> information_ = information_;
@@ -1030,7 +1030,7 @@
// we can now create our image object from the byte array
if (logo_type == "svg") {
// SVG format is handled by the QSvgRenderer class
- auto *svg = new QSvgRenderer();
+ QSvgRenderer *svg = new QSvgRenderer();
if (!svg -> load(*logo_data)) {
return(false);
}
Modified: trunk/sources/ui/conductorpropertiesdialog.cpp
===================================================================
--- trunk/sources/ui/conductorpropertiesdialog.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ui/conductorpropertiesdialog.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -68,7 +68,7 @@
old_value.setValue(conductor->properties());
new_value.setValue(cpd.properties());
- auto *undo = new QPropertyUndoCommand(conductor, "properties", old_value, new_value);
+ QPropertyUndoCommand *undo = new QPropertyUndoCommand(conductor, "properties", old_value, new_value);
undo->setText(tr("Modifier les propriétés d'un conducteur", "undo caption"));
if (!conductor->relatedPotentialConductors().isEmpty() && cpd.applyAll())
Modified: trunk/sources/ui/configpage/generalconfigurationpage.cpp
===================================================================
--- trunk/sources/ui/configpage/generalconfigurationpage.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ui/configpage/generalconfigurationpage.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -40,7 +40,7 @@
if(tabbed)
ui->m_use_tab_mode_rb->setChecked(true);
else
- ui->m_use_windows_mode_rb->setChecked(true);
+ ui->m_use_windows_mode_rb->setChecked(true);
ui->m_zoom_out_beyond_folio->setChecked(settings.value("diagrameditor/zoom-out-beyond-of-folio", false).toBool());
ui->m_use_gesture_trackpad->setChecked(settings.value("diagramview/gestures", false).toBool());
ui->m_save_label_paste->setChecked(settings.value("diagramcommands/erase-label-on-copy", true).toBool());
@@ -81,10 +81,9 @@
fillLang();
-#ifdef Q_OS_MACOS
+ //@todo: fix me " Load time from elements is very slow " -> Disable dialog buttons for define the file system path of the common and custom elements
ui->m_common_elmt_path_cb ->setDisabled(true);
ui->m_custom_elmt_path_cb ->setDisabled(true);
-#endif
}
Modified: trunk/sources/ui/diagrampropertiesdialog.cpp
===================================================================
--- trunk/sources/ui/diagrampropertiesdialog.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ui/diagrampropertiesdialog.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -48,7 +48,7 @@
setWindowTitle(tr("Propriétés du folio", "window title"));
//Border widget
- auto *border_infos = new BorderPropertiesWidget(border, this);
+ BorderPropertiesWidget *border_infos = new BorderPropertiesWidget(border, this);
border_infos -> setReadOnly(diagram_is_read_only);
//Title block widget
@@ -78,7 +78,7 @@
connect(&boutons, SIGNAL(accepted()), this, SLOT(accept()));
connect(&boutons, SIGNAL(rejected()), this, SLOT(reject()));
- auto *glayout = new QGridLayout;
+ QGridLayout *glayout = new QGridLayout;
glayout->addWidget(border_infos,0,0);
glayout->addWidget(titleblock_infos, 1, 0);
glayout->addWidget(m_cpw, 0, 1, 0, 1);
Modified: trunk/sources/ui/diagrampropertieseditordockwidget.cpp
===================================================================
--- trunk/sources/ui/diagrampropertieseditordockwidget.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ui/diagrampropertieseditordockwidget.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -127,7 +127,7 @@
}
case DynamicElementTextItem::Type:
{
- auto *deti = static_cast<DynamicElementTextItem *>(item);
+ DynamicElementTextItem *deti = static_cast<DynamicElementTextItem *>(item);
//For dynamic element text, we open the element editor to edit it
//If we already edit an element, just update the editor with a new element
@@ -144,7 +144,7 @@
}
case QGraphicsItemGroup::Type:
{
- if(auto *group = dynamic_cast<ElementTextItemGroup *>(item))
+ if(ElementTextItemGroup *group = dynamic_cast<ElementTextItemGroup *>(item))
{
//For element text item group, we open the element editor to edit it
//If we already edit an element, just update the editor with a new element
Modified: trunk/sources/ui/diagramselection.cpp
===================================================================
--- trunk/sources/ui/diagramselection.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ui/diagramselection.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -62,8 +62,8 @@
// List Diagrams
for(int i=0,j=0; i<list_diagram_.count(); i++,j++){
- auto *item_Name = new QTableWidgetItem();
- auto *item_State = new QTableWidgetItem();
+ QTableWidgetItem *item_Name = new QTableWidgetItem();
+ QTableWidgetItem *item_State = new QTableWidgetItem();
QString diagram_title = list_diagram_.at(i) -> title();
if (diagram_title.isEmpty()) diagram_title = tr("Folio sans titre");
Modified: trunk/sources/ui/dynamicelementtextitemeditor.cpp
===================================================================
--- trunk/sources/ui/dynamicelementtextitemeditor.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ui/dynamicelementtextitemeditor.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -86,7 +86,7 @@
if (undo->childCount() == 1)
{
- auto *quc = new QPropertyUndoCommand(static_cast<const QPropertyUndoCommand *>(undo->child(0)));
+ QPropertyUndoCommand *quc = new QPropertyUndoCommand(static_cast<const QPropertyUndoCommand *>(undo->child(0)));
if (quc->text().isEmpty())
quc->setText(undo->text());
undo_list << quc;
@@ -105,7 +105,7 @@
if (undo->childCount() == 1)
{
- auto *quc = new QPropertyUndoCommand(static_cast<const QPropertyUndoCommand *>(undo->child(0)));
+ QPropertyUndoCommand *quc = new QPropertyUndoCommand(static_cast<const QPropertyUndoCommand *>(undo->child(0)));
if (quc->text().isEmpty())
quc->setText(undo->text());
undo_list << quc;
@@ -201,7 +201,7 @@
if (!m_element)
return;
- auto *deti = new DynamicElementTextItem(m_element);
+ DynamicElementTextItem *deti = new DynamicElementTextItem(m_element);
if (m_element->diagram())
{
m_element->diagram()->undoStack().push(new AddElementTextCommand(m_element, deti));
Modified: trunk/sources/ui/dynamicelementtextmodel.cpp
===================================================================
--- trunk/sources/ui/dynamicelementtextmodel.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ui/dynamicelementtextmodel.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -138,7 +138,7 @@
if (deti->textFrom() == DynamicElementTextItem::UserText) title = tr("Texte utilisateur");
else if (deti->textFrom() == DynamicElementTextItem::ElementInfo) title = tr("Information de l'élément");
else title = tr("Texte composé");
- auto *srca = new QStandardItem(title);
+ QStandardItem *srca = new QStandardItem(title);
srca->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
srca->setData(textFrom, Qt::UserRole+1);
@@ -192,7 +192,7 @@
QStandardItem *size = new QStandardItem(tr("Taille"));
size->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
- auto *siza = new QStandardItem();
+ QStandardItem *siza = new QStandardItem();
siza->setData(deti->fontSize(), Qt::EditRole);
siza->setData(DynamicElementTextModel::size, Qt::UserRole+1);
siza->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
@@ -205,7 +205,7 @@
QStandardItem *color = new QStandardItem(tr("Couleur"));
color->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
- auto *colora = new QStandardItem;
+ QStandardItem *colora = new QStandardItem;
colora->setData(deti->color(), Qt::ForegroundRole);
colora->setData(deti->color(), Qt::EditRole);
colora->setData(DynamicElementTextModel::color, Qt::UserRole+1);
@@ -219,7 +219,7 @@
QStandardItem *frame = new QStandardItem(tr("Cadre"));
frame->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
- auto *frame_a = new QStandardItem;
+ QStandardItem *frame_a = new QStandardItem;
frame_a->setCheckable(true);
frame_a->setCheckState(deti->frame()? Qt::Checked : Qt::Unchecked);
frame_a->setData(DynamicElementTextModel::frame, Qt::UserRole+1);
@@ -233,7 +233,7 @@
QStandardItem *width = new QStandardItem(tr("Largeur"));
width->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
- auto *width_a = new QStandardItem;
+ QStandardItem *width_a = new QStandardItem;
width_a->setData(deti->textWidth(), Qt::EditRole);
width_a->setData(DynamicElementTextModel::textWidth, Qt::UserRole+1);
width_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
@@ -248,7 +248,7 @@
QStandardItem *x_pos = new QStandardItem(tr("Position X"));
x_pos->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
- auto *x_pos_a = new QStandardItem;
+ QStandardItem *x_pos_a = new QStandardItem;
x_pos_a->setData(deti->pos().x(), Qt::EditRole);
x_pos_a->setData(DynamicElementTextModel::pos, Qt::UserRole+1);
x_pos_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
@@ -261,7 +261,7 @@
QStandardItem *y_pos = new QStandardItem(tr("Position Y"));
y_pos->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
- auto *y_pos_a = new QStandardItem;
+ QStandardItem *y_pos_a = new QStandardItem;
y_pos_a->setData(deti->pos().y(), Qt::EditRole);
y_pos_a->setData(DynamicElementTextModel::pos, Qt::UserRole+1);
y_pos_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
@@ -274,7 +274,7 @@
QStandardItem *rot = new QStandardItem(tr("Rotation"));
rot->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
- auto *rot_a = new QStandardItem;
+ QStandardItem *rot_a = new QStandardItem;
rot_a->setData(deti->rotation(), Qt::EditRole);
rot_a->setData(DynamicElementTextModel::rotation, Qt::UserRole+1);
rot_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
@@ -299,7 +299,7 @@
qsi_list.clear();
- auto *empty_qsi = new QStandardItem(0);
+ QStandardItem *empty_qsi = new QStandardItem(0);
empty_qsi->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
qsi_list << qsi << empty_qsi;
@@ -620,7 +620,7 @@
grp->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDropEnabled | Qt::ItemIsEditable);
grp->setIcon(QET::Icons::textGroup);
- auto *empty_qsi = new QStandardItem(0);
+ QStandardItem *empty_qsi = new QStandardItem(0);
empty_qsi->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
QList<QStandardItem *> qsi_list;
@@ -640,7 +640,7 @@
case Qt::AlignVCenter: text = tr("Centre"); break;
default: break;}
- auto *alignment_a = new QStandardItem(text);
+ QStandardItem *alignment_a = new QStandardItem(text);
alignment_a->setData(DynamicElementTextModel::grpAlignment, Qt::UserRole+1);
alignment_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
qsi_list.clear();
@@ -651,7 +651,7 @@
QStandardItem *x_pos = new QStandardItem(tr("Position X"));
x_pos->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
- auto *x_pos_a = new QStandardItem;
+ QStandardItem *x_pos_a = new QStandardItem;
x_pos_a->setData(group->pos().x(), Qt::EditRole);
x_pos_a->setData(DynamicElementTextModel::grpPos, Qt::UserRole+1);
x_pos_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
@@ -664,7 +664,7 @@
QStandardItem *y_pos = new QStandardItem(tr("Position Y"));
y_pos->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
- auto *y_pos_a = new QStandardItem;
+ QStandardItem *y_pos_a = new QStandardItem;
y_pos_a->setData(group->pos().y(), Qt::EditRole);
y_pos_a->setData(DynamicElementTextModel::grpPos, Qt::UserRole+1);
y_pos_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
@@ -677,7 +677,7 @@
QStandardItem *rot = new QStandardItem(tr("Rotation"));
rot->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
- auto *rot_a = new QStandardItem;
+ QStandardItem *rot_a = new QStandardItem;
rot_a->setData(group->rotation(), Qt::EditRole);
rot_a->setData(DynamicElementTextModel::grpRotation, Qt::UserRole+1);
rot_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
@@ -689,7 +689,7 @@
QStandardItem *v_adj = new QStandardItem(tr("Ajustement vertical"));
v_adj->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
- auto *v_adj_a = new QStandardItem;
+ QStandardItem *v_adj_a = new QStandardItem;
v_adj_a->setData(group->verticalAdjustment(), Qt::EditRole);
v_adj_a->setData(DynamicElementTextModel::grpVAdjust, Qt::UserRole+1);
v_adj_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
@@ -701,7 +701,7 @@
QStandardItem *frame_ = new QStandardItem(tr("Cadre"));
frame_->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
- auto *frame_a = new QStandardItem;
+ QStandardItem *frame_a = new QStandardItem;
frame_a->setCheckable(true);
frame_a->setCheckState(group->frame()? Qt::Checked : Qt::Unchecked);
frame_a->setData(DynamicElementTextModel::grpFrame, Qt::UserRole+1);
@@ -715,7 +715,7 @@
QStandardItem *hold_bottom = new QStandardItem(tr("Maintenir en bas de page"));
hold_bottom->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
- auto *hold_bottom_a = new QStandardItem();
+ QStandardItem *hold_bottom_a = new QStandardItem();
hold_bottom_a->setCheckable(true);
hold_bottom_a->setCheckState(group->holdToBottomPage() ? Qt::Checked : Qt::Unchecked);
hold_bottom_a->setData(DynamicElementTextModel::grpHoldBottom, Qt::UserRole+1);
@@ -1046,7 +1046,7 @@
DynamicElementTextItem *deti = m_texts_list.key(item);
if(deti)
{
- auto *mime_data = new QMimeData();
+ QMimeData *mime_data = new QMimeData();
mime_data->setText(deti->uuid().toString());
mime_data->setData("application/x-qet-element-text-uuid", deti->uuid().toString().toLatin1());
return mime_data;
@@ -1421,7 +1421,7 @@
{
case DynamicElementTextModel::textFrom:
{
- auto *qcb = new QComboBox(parent);
+ QComboBox *qcb = new QComboBox(parent);
qcb->setObjectName("text_from");
qcb->addItem(tr("Texte utilisateur"));
qcb->addItem(tr("Information de l'élément"));
@@ -1430,7 +1430,7 @@
}
case DynamicElementTextModel::infoText:
{
- const auto *detm = static_cast<const DynamicElementTextModel *>(index.model());
+ const DynamicElementTextModel *detm = static_cast<const DynamicElementTextModel *>(index.model());
QStandardItem *qsi = detm->itemFromIndex(index);
if(!qsi)
@@ -1447,7 +1447,7 @@
info_map.insert(QETApp::elementTranslatedInfoKey(str), str);
}
- auto *qcb = new QComboBox(parent);
+ QComboBox *qcb = new QComboBox(parent);
qcb->setObjectName("info_text");
for (const QString& key : info_map.keys()) {
qcb->addItem(key, info_map.value(key));
@@ -1456,7 +1456,7 @@
}
case DynamicElementTextModel::compositeText:
{
- const auto *detm = static_cast<const DynamicElementTextModel *>(index.model());
+ const DynamicElementTextModel *detm = static_cast<const DynamicElementTextModel *>(index.model());
QStandardItem *qsi = detm->itemFromIndex(index);
if(!qsi)
@@ -1466,13 +1466,13 @@
if(!deti)
break;
- auto *cted = new CompositeTextEditDialog(deti, parent);
+ CompositeTextEditDialog *cted = new CompositeTextEditDialog(deti, parent);
cted->setObjectName("composite_text");
return cted;
}
case DynamicElementTextModel::txtAlignment:
{
- const auto *detm = static_cast<const DynamicElementTextModel *>(index.model());
+ const DynamicElementTextModel *detm = static_cast<const DynamicElementTextModel *>(index.model());
QStandardItem *qsi = detm->itemFromIndex(index);
if(!qsi)
@@ -1488,7 +1488,7 @@
}
case DynamicElementTextModel::size:
{
- auto *sb = new QSpinBox(parent);
+ QSpinBox *sb = new QSpinBox(parent);
sb->setObjectName("font_size");
sb->setFrame(false);
return sb;
@@ -1501,7 +1501,7 @@
}
case DynamicElementTextModel::pos:
{
- auto *sb = new QSpinBox(parent);
+ QSpinBox *sb = new QSpinBox(parent);
sb->setObjectName("pos_dialog");
sb->setRange(-1000,10000);
sb->setFrame(false);
@@ -1510,7 +1510,7 @@
}
case DynamicElementTextModel::rotation:
{
- auto *sb = new QSpinBox(parent);
+ QSpinBox *sb = new QSpinBox(parent);
sb->setObjectName("rot_spinbox");
sb->setRange(0, 359);
sb->setWrapping(true);
@@ -1520,7 +1520,7 @@
}
case DynamicElementTextModel::textWidth:
{
- auto *sb = new QSpinBox(parent);
+ QSpinBox *sb = new QSpinBox(parent);
sb->setObjectName("width_spinbox");
sb->setRange(-1, 500);
sb->setFrame(false);
@@ -1529,7 +1529,7 @@
}
case DynamicElementTextModel::grpAlignment:
{
- auto *qcb = new QComboBox(parent);
+ QComboBox *qcb = new QComboBox(parent);
qcb->setFrame(false);
qcb->setObjectName("group_alignment");
qcb->addItem(tr("Gauche"));
@@ -1539,7 +1539,7 @@
}
case DynamicElementTextModel::grpPos:
{
- auto *sb = new QSpinBox(parent);
+ QSpinBox *sb = new QSpinBox(parent);
sb->setObjectName("group_pos");
sb->setRange(-1000,10000);
sb->setFrame(false);
@@ -1548,7 +1548,7 @@
}
case DynamicElementTextModel::grpRotation:
{
- auto *sb = new QSpinBox(parent);
+ QSpinBox *sb = new QSpinBox(parent);
sb->setObjectName("group_rotation");
sb->setRange(0, 359);
sb->setWrapping(true);
@@ -1558,7 +1558,7 @@
}
case DynamicElementTextModel::grpVAdjust:
{
- auto *sb = new QSpinBox(parent);
+ QSpinBox *sb = new QSpinBox(parent);
sb->setObjectName("group_v_adjustment");
sb->setRange(-20, 20);
sb->setFrame(false);
@@ -1575,11 +1575,11 @@
{
if(editor->objectName() == "color_dialog")
{
- if (auto *qsim = dynamic_cast<QStandardItemModel *>(model))
+ if (QStandardItemModel *qsim = dynamic_cast<QStandardItemModel *>(model))
{
if(QStandardItem *qsi = qsim->itemFromIndex(index))
{
- auto *cd = static_cast<QColorDialog *> (editor);
+ QColorDialog *cd = static_cast<QColorDialog *> (editor);
qsi->setData(cd->selectedColor(), Qt::EditRole);
qsi->setData(cd->selectedColor(), Qt::ForegroundRole);
return;
@@ -1589,11 +1589,11 @@
}
else if (editor->objectName() == "info_text")
{
- if (auto *qsim = dynamic_cast<QStandardItemModel *>(model))
+ if (QStandardItemModel *qsim = dynamic_cast<QStandardItemModel *>(model))
{
if(QStandardItem *qsi = qsim->itemFromIndex(index))
{
- auto *cb = static_cast<QComboBox *>(editor);
+ QComboBox *cb = static_cast<QComboBox *>(editor);
qsi->setData(cb->currentText(), Qt::DisplayRole);
qsi->setData(cb->currentData(), Qt::UserRole+2);
return;
@@ -1603,17 +1603,17 @@
}
else if (editor->objectName() == "composite_text")
{
- if (auto *qsim = dynamic_cast<QStandardItemModel *>(model))
+ if (QStandardItemModel *qsim = dynamic_cast<QStandardItemModel *>(model))
{
if(QStandardItem *qsi = qsim->itemFromIndex(index))
{
- auto *cted = static_cast<CompositeTextEditDialog *>(editor);
+ CompositeTextEditDialog *cted = static_cast<CompositeTextEditDialog *>(editor);
QString edited_text = cted->plainText();
QString assigned_text;
- const auto *detm = static_cast<const DynamicElementTextModel *>(index.model());
+ const DynamicElementTextModel *detm = static_cast<const DynamicElementTextModel *>(index.model());
DynamicElementTextItem *deti = detm->textFromIndex(index);
if(deti)
{
@@ -1631,11 +1631,11 @@
}
else if (editor->objectName() == "alignment_text")
{
- if(auto *qsim = dynamic_cast<QStandardItemModel *>(model))
+ if(QStandardItemModel *qsim = dynamic_cast<QStandardItemModel *>(model))
{
if(QStandardItem *qsi = qsim->itemFromIndex(index))
{
- auto *atd = static_cast<AlignmentTextDialog *>(editor);
+ AlignmentTextDialog *atd = static_cast<AlignmentTextDialog *>(editor);
Qt::Alignment align = atd->alignment();
qsi->setData(QVariant::fromValue(align), Qt::UserRole+2);
return;
@@ -1644,11 +1644,11 @@
}
else if (editor->objectName() == "group_alignment")
{
- if(auto *qsim = dynamic_cast<QStandardItemModel *>(model))
+ if(QStandardItemModel *qsim = dynamic_cast<QStandardItemModel *>(model))
{
if(QStandardItem *qsi = qsim->itemFromIndex(index))
{
- auto *cb = static_cast<QComboBox *>(editor);
+ QComboBox *cb = static_cast<QComboBox *>(editor);
qsi->setData(cb->currentText(), Qt::DisplayRole);
}
}
@@ -1671,7 +1671,7 @@
{
object->event(event);
- auto *sb = static_cast<QSpinBox *>(object);
+ QSpinBox *sb = static_cast<QSpinBox *>(object);
switch (event->type()) {
case QEvent::KeyPress:
emit commitData(sb); break;
@@ -1691,7 +1691,7 @@
//Like the hack above, change the current index of the combobox, apply the change immediately, no need to lose focus or press enter.
if((object->objectName() == "text_from" || object->objectName() == "info_text" || object->objectName() == "group_alignment") && event->type() == QEvent::FocusIn)
{
- auto *qcb = static_cast<QComboBox *>(object);
+ QComboBox *qcb = static_cast<QComboBox *>(object);
connect(qcb, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), [this,qcb](){emit commitData(qcb);});
}
Modified: trunk/sources/ui/elementpropertieswidget.cpp
===================================================================
--- trunk/sources/ui/elementpropertieswidget.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ui/elementpropertieswidget.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -84,7 +84,7 @@
{
if(group->parentItem() && group->parentItem()->type() == Element::Type)
{
- auto *elmt = static_cast<Element *>(group->parentItem());
+ Element *elmt = static_cast<Element *>(group->parentItem());
m_diagram = elmt->diagram();
buildGui();
setTextsGroup(group);
@@ -133,7 +133,7 @@
{
if (QString(aepew->metaObject()->className()) == "DynamicElementTextItemEditor")
{
- auto *detie = static_cast<DynamicElementTextItemEditor *>(aepew);
+ DynamicElementTextItemEditor *detie = static_cast<DynamicElementTextItemEditor *>(aepew);
m_tab->setCurrentWidget(detie);
detie->setCurrentText(text);
}
@@ -156,7 +156,7 @@
{
if (QString(aepew->metaObject()->className()) == "DynamicElementTextItemEditor")
{
- auto *detie = static_cast<DynamicElementTextItemEditor *>(aepew);
+ DynamicElementTextItemEditor *detie = static_cast<DynamicElementTextItemEditor *>(aepew);
m_tab->setCurrentWidget(detie);
detie->setCurrentGroup(group);
}
@@ -216,7 +216,7 @@
*/
void ElementPropertiesWidget::findInPanel()
{
- auto *custom_element = qobject_cast<CustomElement *>(m_element);
+ CustomElement *custom_element = qobject_cast<CustomElement *>(m_element);
if (custom_element && m_diagram)
{
m_diagram->findElementRequired(custom_element->location());
@@ -230,7 +230,7 @@
*/
void ElementPropertiesWidget::editElement()
{
- auto *custom_element = qobject_cast<CustomElement *>(m_element);
+ CustomElement *custom_element = qobject_cast<CustomElement *>(m_element);
if (custom_element && m_diagram)
{
m_diagram->findElementRequired(custom_element->location());
@@ -246,7 +246,7 @@
void ElementPropertiesWidget::buildGui()
{
m_tab = new QTabWidget(this);
- auto *main_layout = new QVBoxLayout(this);
+ QVBoxLayout *main_layout = new QVBoxLayout(this);
main_layout -> addWidget(m_tab);
setLayout(main_layout);
}
@@ -342,8 +342,8 @@
*/
QWidget *ElementPropertiesWidget::generalWidget()
{
- auto *custom_element = qobject_cast<CustomElement *>(m_element);
- auto *ghost_element = qobject_cast<GhostElement *>(m_element);
+ CustomElement *custom_element = qobject_cast<CustomElement *>(m_element);
+ GhostElement *ghost_element = qobject_cast<GhostElement *>(m_element);
// type de l'element
QString description_string;
@@ -371,7 +371,7 @@
// widget himself
QWidget *general_widget = new QWidget (m_tab);
- auto *vlayout_ = new QVBoxLayout (general_widget);
+ QVBoxLayout *vlayout_ = new QVBoxLayout (general_widget);
general_widget -> setLayout(vlayout_);
//widget for the text
@@ -389,7 +389,7 @@
connect(find_in_panel, SIGNAL(clicked()), this, SLOT(findInPanel()));
QPushButton *edit_element = new QPushButton(QET::Icons::ElementEdit, tr("Éditer l'élément"), general_widget);
connect(edit_element, SIGNAL(clicked()), this, SLOT(editElement()));
- auto *hlayout_ = new QHBoxLayout;
+ QHBoxLayout *hlayout_ = new QHBoxLayout;
hlayout_->addWidget(find_in_panel);
hlayout_->addWidget(edit_element);
vlayout_->addLayout(hlayout_);
Modified: trunk/sources/ui/importelementdialog.cpp
===================================================================
--- trunk/sources/ui/importelementdialog.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ui/importelementdialog.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -42,10 +42,10 @@
void ImportElementDialog::setUpWidget()
{
- auto *button_group = new QButtonGroup(this);
+ QButtonGroup *button_group = new QButtonGroup(this);
button_group->addButton(ui->m_use_actual_rd);
button_group->addButton(ui->m_use_drop_rb);
- auto *button_group_drop = new QButtonGroup(this);
+ QButtonGroup *button_group_drop = new QButtonGroup(this);
button_group_drop->addButton(ui->m_erase_actual_rb);
button_group_drop->addButton(ui->m_use_both_rb);
Modified: trunk/sources/ui/linksingleelementwidget.cpp
===================================================================
--- trunk/sources/ui/linksingleelementwidget.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ui/linksingleelementwidget.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -157,7 +157,7 @@
*/
QUndoCommand *LinkSingleElementWidget::associatedUndo() const
{
- auto *undo = new LinkElementCommand(m_element);
+ LinkElementCommand *undo = new LinkElementCommand(m_element);
if (m_element_to_link || m_unlink)
{
@@ -257,7 +257,7 @@
qDebug() << "In method void LinkSingleElementWidget::updateUi(), provided element must be in a diagram";
}
- auto *qtwi = new QTreeWidgetItem(ui->m_tree_widget, str_list);
+ QTreeWidgetItem *qtwi = new QTreeWidgetItem(ui->m_tree_widget, str_list);
m_qtwi_elmt_hash.insert(qtwi, elmt);
m_qtwi_strl_hash.insert(qtwi, search_list);
}
@@ -311,7 +311,7 @@
qDebug() << "In method void LinkSingleElementWidget::updateUi(), provided element must be in a diagram";
}
- auto *qtwi = new QTreeWidgetItem(ui->m_tree_widget, str_list);
+ QTreeWidgetItem *qtwi = new QTreeWidgetItem(ui->m_tree_widget, str_list);
m_qtwi_elmt_hash.insert(qtwi, elmt);
m_qtwi_strl_hash.insert(qtwi, search_list);
}
@@ -381,7 +381,7 @@
foreach(QStringList strl , m_qtwi_strl_hash.values())
search.append(strl);
- auto *c = new QCompleter(search, ui->m_search_field);
+ QCompleter *c = new QCompleter(search, ui->m_search_field);
c->setCaseSensitivity(Qt::CaseInsensitive);
ui->m_search_field->setCompleter(c);
}
Modified: trunk/sources/ui/masterpropertieswidget.cpp
===================================================================
--- trunk/sources/ui/masterpropertieswidget.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ui/masterpropertieswidget.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -196,7 +196,7 @@
return nullptr;
}
- auto *undo = new LinkElementCommand(m_element);
+ LinkElementCommand *undo = new LinkElementCommand(m_element);
if (to_link.isEmpty())
undo->unlinkAll();
@@ -239,7 +239,7 @@
const QList<Element *> free_list = elmt_prov.freeElement(Element::Slave);
for(Element *elmt : free_list)
{
- auto *qtwi = new QTreeWidgetItem(ui->m_free_tree_widget);
+ QTreeWidgetItem *qtwi = new QTreeWidgetItem(ui->m_free_tree_widget);
qtwi->setIcon(0, elmt->pixmap());
if(settings.value("genericpanel/folio", false).toBool())
@@ -267,7 +267,7 @@
const QList<Element *> link_list = m_element->linkedElements();
for(Element *elmt : link_list)
{
- auto *qtwi = new QTreeWidgetItem(ui->m_link_tree_widget);
+ QTreeWidgetItem *qtwi = new QTreeWidgetItem(ui->m_link_tree_widget);
qtwi->setIcon(0, elmt->pixmap());
if(settings.value("genericpanel/folio", false).toBool())
Modified: trunk/sources/ui/multipastedialog.cpp
===================================================================
--- trunk/sources/ui/multipastedialog.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ui/multipastedialog.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -126,7 +126,7 @@
{
QPair <Terminal *, Terminal *> pair = elmt->AlignedFreeTerminals().takeFirst();
- auto *conductor = new Conductor(pair.first, pair.second);
+ Conductor *conductor = new Conductor(pair.first, pair.second);
m_diagram->undoStack().push(new AddItemCommand<Conductor *>(conductor, m_diagram, QPointF()));
//Autonum the new conductor, the undo command associated for this, have for parent undo_object
Modified: trunk/sources/ui/potentialselectordialog.cpp
===================================================================
--- trunk/sources/ui/potentialselectordialog.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ui/potentialselectordialog.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -240,8 +240,8 @@
if(!cp2.m_tension_protocol.isEmpty())
text2.append(tr("\nTension/protocole : %1").arg(cp2.m_tension_protocol));
- auto *rb1 = new QRadioButton(text1, this);
- auto *rb2 = new QRadioButton(text2, this);
+ QRadioButton *rb1 = new QRadioButton(text1, this);
+ QRadioButton *rb2 = new QRadioButton(text2, this);
connect(rb1, &QRadioButton::toggled, [this](bool t)
{
Modified: trunk/sources/ui/projectpropertiesdialog.cpp
===================================================================
--- trunk/sources/ui/projectpropertiesdialog.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/ui/projectpropertiesdialog.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -28,8 +28,8 @@
* @param parent : parent widget of this dialog
*/
ProjectPropertiesDialog::ProjectPropertiesDialog(QETProject *project, QWidget *parent) {
- auto *newDiagramPage = new NewDiagramPage(project,parent,this);
- auto *projectAutoNumConfigPage = new ProjectAutoNumConfigPage (project);
+ NewDiagramPage *newDiagramPage = new NewDiagramPage(project,parent,this);
+ ProjectAutoNumConfigPage *projectAutoNumConfigPage = new ProjectAutoNumConfigPage (project);
m_properties_dialog = new ConfigDialog (parent);
m_properties_dialog -> setWindowTitle(QObject::tr("Propriétés du projet", "window title"));
m_properties_dialog -> addPage(new ProjectMainConfigPage (project));
@@ -72,6 +72,6 @@
* Change the current displayed tab to folio tab.
*/
void ProjectPropertiesDialog::changeToFolio() {
- auto *autoNumPage = static_cast <ProjectAutoNumConfigPage*>(m_properties_dialog->pages.at(2));
+ ProjectAutoNumConfigPage *autoNumPage = static_cast <ProjectAutoNumConfigPage*>(m_properties_dialog->pages.at(2));
autoNumPage->changeToTab(3);
}
Modified: trunk/sources/undocommand/addelementtextcommand.cpp
===================================================================
--- trunk/sources/undocommand/addelementtextcommand.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/undocommand/addelementtextcommand.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -349,7 +349,7 @@
if (id() != other->id() || other->childCount())
return false;
- auto const *undo = static_cast<const AlignmentTextsGroupCommand *>(other);
+ AlignmentTextsGroupCommand const *undo = static_cast<const AlignmentTextsGroupCommand *>(other);
if (m_group != undo->m_group)
return false;
Modified: trunk/sources/undocommand/changeelementinformationcommand.cpp
===================================================================
--- trunk/sources/undocommand/changeelementinformationcommand.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/undocommand/changeelementinformationcommand.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -38,7 +38,7 @@
bool ChangeElementInformationCommand::mergeWith(const QUndoCommand *other)
{
if (id() != other->id()) return false;
- auto const *undo = static_cast<const ChangeElementInformationCommand*>(other);
+ ChangeElementInformationCommand const *undo = static_cast<const ChangeElementInformationCommand*>(other);
if (m_element != undo->m_element) return false;
m_new_info = undo->m_new_info;
return true;
Modified: trunk/sources/undocommand/linkelementcommand.cpp
===================================================================
--- trunk/sources/undocommand/linkelementcommand.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/undocommand/linkelementcommand.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -45,7 +45,7 @@
bool LinkElementCommand::mergeWith(const QUndoCommand *other)
{
if (id() != other->id() || other->childCount()) return false;
- auto const *undo = static_cast<const LinkElementCommand *> (other);
+ LinkElementCommand const *undo = static_cast<const LinkElementCommand *> (other);
if (m_element != undo->m_element) return false;
m_linked_after = undo->m_linked_after;
return true;
Modified: trunk/sources/undocommand/rotateselectioncommand.cpp
===================================================================
--- trunk/sources/undocommand/rotateselectioncommand.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/undocommand/rotateselectioncommand.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -61,7 +61,7 @@
break;
case QGraphicsItemGroup::Type:
{
- if(auto *grp = dynamic_cast<ElementTextItemGroup *>(item))
+ if(ElementTextItemGroup *grp = dynamic_cast<ElementTextItemGroup *>(item))
if(grp->parentElement() && !grp->parentElement()->isSelected())
m_undo << new QPropertyUndoCommand(grp, "rotation", QVariant(item->rotation()), QVariant(item->rotation()+angle), this);
}
Modified: trunk/sources/undocommand/rotatetextscommand.cpp
===================================================================
--- trunk/sources/undocommand/rotatetextscommand.cpp 2018-07-28 12:09:00 UTC (rev 5460)
+++ trunk/sources/undocommand/rotatetextscommand.cpp 2018-07-30 15:24:29 UTC (rev 5461)
@@ -43,7 +43,7 @@
texts_list << dti;
if(dti->type() == ConductorTextItem::Type)
{
- auto *cti = static_cast<ConductorTextItem *>(dti);
+ ConductorTextItem *cti = static_cast<ConductorTextItem *>(dti);
m_cond_texts.insert(cti, cti->wasRotateByUser());
}
}
@@ -143,7 +143,7 @@
if(m_anim_group == nullptr)
m_anim_group = new QParallelAnimationGroup();
- auto *animation = new QPropertyAnimation(target, propertyName);
+ QPropertyAnimation *animation = new QPropertyAnimation(target, propertyName);
animation->setDuration(300);
animation->setStartValue(start);
animation->setEndValue(end);