oops, somehow I deleted the first commit message line :-)
What I wanted to say is that the moc compiler doesn't care for #ifdef clauses
and therefore compiling might fail if the moc file is not correctly re-
generated.
To avoid this, always create the GPCamera test, but implement it empty if
GPHOTO2 has been disabled.
Andi
SVN commit 1050959 by aclemens:
the header file and always compile the GPCamera test, but if no GPHOTO2 was
found, implement the test case empty (it will return true by default).
M +3 -2 cameranamehelpertest.cpp
M +0 -6 cameranamehelpertest.h
--- trunk/extragear/graphics/digikam/tests/cameranamehelpertest.cpp #1050958:1050959
@@ -30,6 +30,7 @@
// Local includes
#include "cameranamehelper.h"
+#include "config-digikam.h"
#ifdef HAVE_GPHOTO2
#include "gpcamera.h"
@@ -74,9 +75,9 @@
QCOMPARE(CameraNameHelper::createCameraName(vendor, product, mode, autoDetect), result);
}
-#ifdef HAVE_GPHOTO2
void CameraNameHelperTest::testCameraNameFromGPCamera()
{
+#ifdef HAVE_GPHOTO2
int count = 0;
QStringList clist;
@@ -87,8 +88,8 @@
{
QCOMPARE(CameraNameHelper::formattedFullCameraName(camera), camera.simplified());
}
+#endif
}
-#endif
void CameraNameHelperTest::testForSameDevices_data()
{
--- trunk/extragear/graphics/digikam/tests/cameranamehelpertest.h #1050958:1050959
@@ -28,19 +28,13 @@
#include <QtCore/QObject>
-// Local includes
-
-#include "config-digikam.h"
-
class CameraNameHelperTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
-#ifdef HAVE_GPHOTO2
void testCameraNameFromGPCamera();
-#endif
void testStaticCreateName();
void testStaticCreateName_data();
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel