title: No matching function for call to connect - Qt 5.5
body: <p>When updating our Signal/Slot function we run into undefined problems.
  This is the error we receive:</p>
  
  <hr>
  
  <p>This is what is was before, working all fine without problems:</p>
  
  <p>Mainwindow.cpp</p>
  
  <pre><code>connect(_restrict, &amp;Restrict::windowChanged, _record, &amp;Record::onWindowChanged);
  </code></pre>
  
  <p>Mainwindow.h:</p>
  
  <pre><code>private slots:
  void onWindowChanged(QDateTime current, QString processName, QString windowTitle, QString url, long prevPID, long currPID);
  </code></pre>
  
  <p>record.h:</p>
  
  <pre><code>public slots:
  void onWindowChanged(QDateTime time, QString processName, QString windowTitle, QString url, long prevPID, long currPid);
  </code></pre>
  
  <p>restrict.h:</p>
  
  <pre><code>signals:
  void windowChanged(QDateTime time, QString processName, QString windowTitle, QString url = "", long prevPID = -1, long currPid = -1);
  </code></pre>
  
  <hr>
  
  <p>Our data after the changes:</p>
  
  <p>Mainwindow.cpp</p>
  
  <pre><code>connect(_restrict, &amp;Restrict::windowChanged, _record, &amp;Record::onWindowChanged);
  </code></pre>
  
  <p>Mainwindow.h:</p>
  
  <pre><code>private slots:
  void onWindowChanged(QDateTime current, QString processName, QString windowTitle, QString url, long prevPID, long currPID, bool whitelisted);
  </code></pre>
  
  <p>record.h:</p>
  
  <pre><code>public slots:
  void onWindowChanged(QDateTime time, QString processName, QString windowTitle, QString url, long prevPID, long currPid, bool whitelisted);
  </code></pre>
  
  <p>restrict.h:</p>
  
  <pre><code>signals:
  void windowChanged(QDateTime time, QString processName, QString windowTitle, QString url = "", long prevPID = -1, long currPid = -1, bool whitelisted = false);
  </code></pre>
  
  <hr>
  
  <p>Errors coming up:</p>
  
  <pre><code>\mainwindow.cpp:84:91: error: no matching function for call to 'MainWindow::connect(Restrict*&amp;, void (Restrict::*)(QDateTime, QString, QString, QString, long int, long int, bool), Record*&amp;, void (Record::*)(QDateTime, QString, QString, QString, long int, long int, bool))'
               connect(_restrict, &amp;Restrict::windowChanged, _record, &amp;Record::onWindowChanged);
                                                                                             ^
  \mainwindow.cpp:84:91: note: candidates are:
  In file included from \Qt\5.5\mingw492_32\include/QtCore/qabstractanimation.h:37:0,
                   from \Qt\5.5\mingw492_32\include/QtCore/QtCore:4,
                   from \Qt\5.5\mingw492_32\include/QtWidgets/QtWidgetsDepends:3,
                   from \Qt\5.5\mingw492_32\include\QtWidgets/QtWidgets:3,
                   from \mainwindow.cpp:1:
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:196:36: note: static QMetaObject::Connection QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)
       static QMetaObject::Connection connect(const QObject *sender, const char *signal,
                                      ^
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:196:36: note:   no known conversion for argument 2 from 'void (Restrict::*)(QDateTime, QString, QString, QString, long int, long int, bool)' to 'const char*'
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:199:36: note: static QMetaObject::Connection QObject::connect(const QObject*, const QMetaMethod&amp;, const QObject*, const QMetaMethod&amp;, Qt::ConnectionType)
       static QMetaObject::Connection connect(const QObject *sender, const QMetaMethod &amp;signal,
                                      ^
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:199:36: note:   no known conversion for argument 2 from 'void (Restrict::*)(QDateTime, QString, QString, QString, long int, long int, bool)' to 'const QMetaMethod&amp;'
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:475:32: note: QMetaObject::Connection QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const
   inline QMetaObject::Connection QObject::connect(const QObject *asender, const char *asignal,
                                  ^
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:475:32: note:   no known conversion for argument 2 from 'void (Restrict::*)(QDateTime, QString, QString, QString, long int, long int, bool)' to 'const char*'
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:213:43: note: template&lt;class Func1, class Func2&gt; static QMetaObject::Connection QObject::connect(const typename QtPrivate::FunctionPointer&lt;Func&gt;::Object*, Func1, const typename QtPrivate::FunctionPointer&lt;Func2&gt;::Object*, Func2, Qt::ConnectionType)
       static inline QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer&lt;Func1&gt;::Object *sender, Func1 signal,
                                             ^
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:213:43: note:   template argument deduction/substitution failed:
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h: In substitution of 'template&lt;class Func1, class Func2&gt; static QMetaObject::Connection QObject::connect(const typename QtPrivate::FunctionPointer&lt;Func&gt;::Object*, Func1, const typename QtPrivate::FunctionPointer&lt;Func2&gt;::Object*, Func2, Qt::ConnectionType) [with Func1 = void (Restrict::*)(QDateTime, QString, QString, QString, long int, long int, bool); Func2 = void (Record::*)(QDateTime, QString, QString, QString, long int, long int, bool)]':
  \mainwindow.cpp:84:91:   required from here
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:213:43: error: no type named 'Object' in 'struct QtPrivate::FunctionPointer&lt;void (Record::*)(QDateTime, QString, QString, QString, long int, long int, bool)&gt;'
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:245:13: note: template&lt;class Func1, class Func2&gt; static typename QtPrivate::QEnableIf&lt;((int)(QtPrivate::FunctionPointer&lt;Func2&gt;::ArgumentCount) &gt;= 0), QMetaObject::Connection&gt;::Type QObject::connect(const typename QtPrivate::FunctionPointer&lt;Func&gt;::Object*, Func1, Func2)
               connect(const typename QtPrivate::FunctionPointer&lt;Func1&gt;::Object *sender, Func1 signal, Func2 slot)
               ^
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:245:13: note:   template argument deduction/substitution failed:
  \mainwindow.cpp:84:91: note:   candidate expects 3 arguments, 4 provided
               connect(_restrict, &amp;Restrict::windowChanged, _record, &amp;Record::onWindowChanged);
                                                                                             ^
  In file included from \Qt\5.5\mingw492_32\include/QtCore/qabstractanimation.h:37:0,
                   from \Qt\5.5\mingw492_32\include/QtCore/QtCore:4,
                   from \Qt\5.5\mingw492_32\include/QtWidgets/QtWidgetsDepends:3,
                   from \Qt\5.5\mingw492_32\include\QtWidgets/QtWidgets:3,
                   from \mainwindow.cpp:1:
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:254:13: note: template&lt;class Func1, class Func2&gt; static typename QtPrivate::QEnableIf&lt;(((int)(QtPrivate::FunctionPointer&lt;Func2&gt;::ArgumentCount) &gt;= 0) &amp;&amp; (! QtPrivate::FunctionPointer&lt;Func2&gt;::IsPointerToMemberFunction)), QMetaObject::Connection&gt;::Type QObject::connect(const typename QtPrivate::FunctionPointer&lt;Func&gt;::Object*, Func1, const QObject*, Func2, Qt::ConnectionType)
               connect(const typename QtPrivate::FunctionPointer&lt;Func1&gt;::Object *sender, Func1 signal, const QObject *context, Func2 slot,
               ^
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:254:13: note:   template argument deduction/substitution failed:
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h: In substitution of 'template&lt;class Func1, class Func2&gt; static typename QtPrivate::QEnableIf&lt;(((int)(QtPrivate::FunctionPointer&lt;Func2&gt;::ArgumentCount) &gt;= 0) &amp;&amp; (! QtPrivate::FunctionPointer&lt;Func2&gt;::IsPointerToMemberFunction)), QMetaObject::Connection&gt;::Type QObject::connect(const typename QtPrivate::FunctionPointer&lt;Func&gt;::Object*, Func1, const QObject*, Func2, Qt::ConnectionType) [with Func1 = void (Restrict::*)(QDateTime, QString, QString, QString, long int, long int, bool); Func2 = void (Record::*)(QDateTime, QString, QString, QString, long int, long int, bool)]':
  \mainwindow.cpp:84:91:   required from here
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:254:13: error: invalid use of incomplete type 'struct QtPrivate::QEnableIf&lt;false, QMetaObject::Connection&gt;'
  In file included from \Qt\5.5\mingw492_32\include/QtCore/qnamespace.h:37:0,
                   from \Qt\5.5\mingw492_32\include/QtCore/qobjectdefs.h:41,
                   from \Qt\5.5\mingw492_32\include/QtCore/qobject.h:40,
                   from \Qt\5.5\mingw492_32\include/QtCore/qabstractanimation.h:37,
                   from \Qt\5.5\mingw492_32\include/QtCore/QtCore:4,
                   from \Qt\5.5\mingw492_32\include/QtWidgets/QtWidgetsDepends:3,
                   from \Qt\5.5\mingw492_32\include\QtWidgets/QtWidgets:3,
                   from \mainwindow.cpp:1:
  \Qt\5.5\mingw492_32\include/QtCore/qglobal.h:1073:45: error: declaration of 'struct QtPrivate::QEnableIf&lt;false, QMetaObject::Connection&gt;'
   template &lt;bool B, typename T = void&gt; struct QEnableIf;
                                               ^
  In file included from \Qt\5.5\mingw492_32\include/QtCore/qabstractanimation.h:37:0,
                   from \Qt\5.5\mingw492_32\include/QtCore/QtCore:4,
                   from \Qt\5.5\mingw492_32\include/QtWidgets/QtWidgetsDepends:3,
                   from \Qt\5.5\mingw492_32\include\QtWidgets/QtWidgets:3,
                   from \mainwindow.cpp:1:
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:285:13: note: template&lt;class Func1, class Func2&gt; static typename QtPrivate::QEnableIf&lt;(QtPrivate::FunctionPointer&lt;Func2&gt;::ArgumentCount == (-1)), QMetaObject::Connection&gt;::Type QObject::connect(const typename QtPrivate::FunctionPointer&lt;Func&gt;::Object*, Func1, Func2)
               connect(const typename QtPrivate::FunctionPointer&lt;Func1&gt;::Object *sender, Func1 signal, Func2 slot)
               ^
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:285:13: note:   template argument deduction/substitution failed:
  \mainwindow.cpp:84:91: note:   candidate expects 3 arguments, 4 provided
               connect(_restrict, &amp;Restrict::windowChanged, _record, &amp;Record::onWindowChanged);
                                                                                             ^
  In file included from \Qt\5.5\mingw492_32\include/QtCore/qabstractanimation.h:37:0,
                   from \Qt\5.5\mingw492_32\include/QtCore/QtCore:4,
                   from \Qt\5.5\mingw492_32\include/QtWidgets/QtWidgetsDepends:3,
                   from \Qt\5.5\mingw492_32\include\QtWidgets/QtWidgets:3,
                   from \mainwindow.cpp:1:
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:293:13: note: template&lt;class Func1, class Func2&gt; static typename QtPrivate::QEnableIf&lt;(QtPrivate::FunctionPointer&lt;Func2&gt;::ArgumentCount == (-1)), QMetaObject::Connection&gt;::Type QObject::connect(const typename QtPrivate::FunctionPointer&lt;Func&gt;::Object*, Func1, const QObject*, Func2, Qt::ConnectionType)
               connect(const typename QtPrivate::FunctionPointer&lt;Func1&gt;::Object *sender, Func1 signal, const QObject *context, Func2 slot,
               ^
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h:293:13: note:   template argument deduction/substitution failed:
  \Qt\5.5\mingw492_32\include/QtCore/qobject.h: In substitution of 'template&lt;class Func1, class Func2&gt; static typename QtPrivate::QEnableIf&lt;(QtPrivate::FunctionPointer&lt;Func2&gt;::ArgumentCount == (-1)), QMetaObject::Connection&gt;::Type QObject::connect(const typename QtPrivate::FunctionPointer&lt;Func&gt;::Object*, Func1, const QObject*, Func2, Qt::ConnectionType) [with Func1 = void (Restrict::*)(QDateTime, QString, QString, QString, long int, long int, bool); Func2 = void (Record::*)(QDateTime, QString, QString, QString, long int, long int, bool)]':
  \mainwindow.cpp:84:91:   required from here
  </code></pre>
  
  <p>We only added a single boolean value, added it to the signal as well as the corresponding slot and now we have no idea why this suddenly does not work anymore.</p>