[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [lokalize] src: more of new connect synax
From:       Nick Shaforostoff <shafff () ukr ! net>
Date:       2016-02-22 1:57:30
Message-ID: E1aXfkg-0001Sf-VP () scm ! kde ! org
[Download RAW message or body]

Git commit b8a210b792d3c591a9e7d4d5e32dedea02296307 by Nick Shaforostoff.
Committed on 22/02/2016 at 01:56.
Pushed by shaforo into branch 'master'.

more of new connect synax

M  +2    -2    src/catalog/catalog.cpp
M  +1    -1    src/lokalizemainwindow.cpp
M  +10   -19   src/project/projectmodel.cpp

http://commits.kde.org/lokalize/b8a210b792d3c591a9e7d4d5e32dedea02296307

diff --git a/src/catalog/catalog.cpp b/src/catalog/catalog.cpp
index 3c7ab15..f139f91 100644
--- a/src/catalog/catalog.cpp
+++ b/src/catalog/catalog.cpp
@@ -123,10 +123,10 @@ Catalog::Catalog(QObject *parent)
     QTimer* t=&(d._autoSaveTimer);
     t->setInterval(2*60*1000);
     t->setSingleShot(false);
-    connect(t,   SIGNAL(timeout()),        this,SLOT(doAutoSave()));
+    connect(t, &QTimer::timeout, this, &Catalog::doAutoSave);
     connect(this,SIGNAL(signalFileSaved()),   t,SLOT(start()));
     connect(this,SIGNAL(signalFileLoaded()),  t,SLOT(start()));
-    connect(this,SIGNAL(indexChanged(int)),this,SLOT(setAutoSaveDirty()));
+    connect(this, &Catalog::indexChanged, this, &Catalog::setAutoSaveDirty);
 #endif
     connect(Project::local(),SIGNAL(configChanged()),this,SLOT(projectConfigChanged()));
  }
diff --git a/src/lokalizemainwindow.cpp b/src/lokalizemainwindow.cpp
index 6849c7f..89b742c 100644
--- a/src/lokalizemainwindow.cpp
+++ b/src/lokalizemainwindow.cpp
@@ -311,7 +311,7 @@ EditorTab* LokalizeMainWindow::fileOpen(QString filePath, int \
entry, bool setAsA  w->mergeOpen(mergeFile);
 
     m_openRecentFileAction->addUrl(QUrl::fromLocalFile(filePath));//(w->currentUrl());
                
-    connect(sw, &QObject::destroyed,this,&LokalizeMainWindow::editorClosed);
+    connect(sw, SIGNAL(destroyed(QObject*)),this,SLOT(editorClosed(QObject*)));
     connect(w, SIGNAL(aboutToBeClosed()),this,SLOT(resetMultiEditorAdaptor()));
     connect(w, SIGNAL(fileOpenRequested(QString,QString,QString)),this,SLOT(fileOpen(QString,QString,QString)));
                
     connect(w, SIGNAL(tmLookupRequested(QString,QString)),this,SLOT(lookupInTranslationMemory(QString,QString)));
                
diff --git a/src/project/projectmodel.cpp b/src/project/projectmodel.cpp
index ebfd5af..4a2eefe 100644
--- a/src/project/projectmodel.cpp
+++ b/src/project/projectmodel.cpp
@@ -75,28 +75,22 @@ ProjectModel::ProjectModel(QObject *parent)
     m_potModel.dirLister()->setAutoErrorHandlingEnabled(false, NULL);
     m_potModel.dirLister()->setNameFilter(QStringLiteral("*.pot"));
 
-    connect(&m_poModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
-            this, SLOT(po_dataChanged(QModelIndex,QModelIndex)));
+    connect(&m_poModel, &KDirModel::dataChanged, this, \
&ProjectModel::po_dataChanged);  
-    connect(&m_poModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
-            this, SLOT(po_rowsInserted(QModelIndex,int,int)));
+    connect(&m_poModel, &KDirModel::rowsInserted, this, \
&ProjectModel::po_rowsInserted);  
-    connect(&m_poModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),
-            this, SLOT(po_rowsRemoved(QModelIndex,int,int)));
+    connect(&m_poModel, &KDirModel::rowsRemoved, this, \
&ProjectModel::po_rowsRemoved);  
-    connect(&m_potModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
-            this, SLOT(pot_dataChanged(QModelIndex,QModelIndex)));
+    connect(&m_potModel, &KDirModel::dataChanged, this, \
&ProjectModel::pot_dataChanged);  
-    connect(&m_potModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
-            this, SLOT(pot_rowsInserted(QModelIndex,int,int)));
+    connect(&m_potModel, &KDirModel::rowsInserted, this, \
&ProjectModel::pot_rowsInserted);  
-    connect(&m_potModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),
-            this, SLOT(pot_rowsRemoved(QModelIndex,int,int)));
+    connect(&m_potModel, &KDirModel::rowsRemoved, this, \
&ProjectModel::pot_rowsRemoved);  
     m_delayedReloadTimer->setSingleShot(true);
     m_doneTimer->setSingleShot(true);
-    connect(m_doneTimer, SIGNAL(timeout()), this, SLOT(updateTotalsChanged()));
-    connect(m_delayedReloadTimer, SIGNAL(timeout()), this, SLOT(reload()));
+    connect(m_doneTimer, &QTimer::timeout, this, \
&ProjectModel::updateTotalsChanged); +    connect(m_delayedReloadTimer, \
&QTimer::timeout, this, &ProjectModel::reload);  
     setUrl(QUrl(), QUrl());
 }
@@ -1053,9 +1047,7 @@ void ProjectModel::startNewMetadataJob()
         files.append(itemForIndex(index(row, 0, item)));
 
     m_activeJob = new UpdateStatsJob(files, this);
-    connect(
-        m_activeJob,SIGNAL(done(UpdateStatsJob*)),
-        this,SLOT(finishMetadataUpdate(UpdateStatsJob*)));
+    connect(m_activeJob, &UpdateStatsJob::done, this, \
&ProjectModel::finishMetadataUpdate);  
     m_threadPool->start(m_activeJob);
 }
@@ -1105,8 +1097,7 @@ void ProjectModel::slotFileSaved(const QString& filePath)
     files.append(itemForIndex(index));
 
     UpdateStatsJob* j = new UpdateStatsJob(files);
-    connect(j,SIGNAL(done(UpdateStatsJob*)),
-        this,SLOT(finishSingleMetadataUpdate(UpdateStatsJob*)));
+    connect(j, &UpdateStatsJob::done, this, \
&ProjectModel::finishSingleMetadataUpdate);  
     m_threadPool->start(j);
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic