mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 22:00:35 +01:00
Apply clang-tidy's modernize-use-auto
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5449 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -74,11 +74,11 @@ void NewElementWizard::preselectedLocation(const ElementsLocation &location)
|
||||
*/
|
||||
QWizardPage *NewElementWizard::buildStep1()
|
||||
{
|
||||
QWizardPage *page = new QWizardPage();
|
||||
auto *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"));
|
||||
QVBoxLayout *layout = new QVBoxLayout();
|
||||
auto *layout = new QVBoxLayout();
|
||||
|
||||
m_tree_view = new QTreeView(this);
|
||||
|
||||
@@ -100,11 +100,11 @@ QWizardPage *NewElementWizard::buildStep1()
|
||||
* @return
|
||||
*/
|
||||
QWizardPage *NewElementWizard::buildStep2() {
|
||||
QWizardPage *page = new QWizardPage();
|
||||
auto *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"));
|
||||
QVBoxLayout *layout = new QVBoxLayout();
|
||||
auto *layout = new QVBoxLayout();
|
||||
|
||||
m_qle_filename = new QFileNameEdit(tr("nouvel_element"));
|
||||
m_qle_filename -> selectAll();
|
||||
@@ -124,11 +124,11 @@ QWizardPage *NewElementWizard::buildStep2() {
|
||||
* @return
|
||||
*/
|
||||
QWizardPage *NewElementWizard::buildStep3() {
|
||||
QWizardPage *page = new QWizardPage();
|
||||
auto *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"));
|
||||
QVBoxLayout *layout = new QVBoxLayout();
|
||||
auto *layout = new QVBoxLayout();
|
||||
|
||||
m_names_list = new NamesListWidget();
|
||||
NamesList hash_name;
|
||||
@@ -170,7 +170,7 @@ bool NewElementWizard::validStep1()
|
||||
QModelIndex index = m_tree_view->currentIndex();
|
||||
if (index.isValid()) {
|
||||
|
||||
ElementCollectionItem *eci = static_cast<ElementCollectionItem*>(m_model->itemFromIndex(index));
|
||||
auto *eci = static_cast<ElementCollectionItem*>(m_model->itemFromIndex(index));
|
||||
if (eci && eci->isDir()) {
|
||||
ElementsLocation loc(eci->collectionPath());
|
||||
if (loc.exist()) {
|
||||
@@ -226,7 +226,7 @@ bool NewElementWizard::validStep2() {
|
||||
* Lauch an element editor for create the new element
|
||||
*/
|
||||
void NewElementWizard::createNewElement() {
|
||||
QETElementEditor *edit_new_element = new QETElementEditor(parentWidget());
|
||||
auto *edit_new_element = new QETElementEditor(parentWidget());
|
||||
edit_new_element -> setNames(m_names_list -> names());
|
||||
|
||||
ElementsLocation loc_ = m_chosen_location;
|
||||
|
||||
Reference in New Issue
Block a user