File indexing completed on 2025-03-16 04:30:27
0001 /* 0002 SPDX-FileCopyrightText: 2011 Michal Malek <michalm@jabster.pl> 0003 SPDX-FileCopyrightText: 1998-2009 Sebastian Trueg <trueg@k3b.org> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef K3B_TEST_UTILS_H 0009 #define K3B_TEST_UTILS_H 0010 0011 #include <QSignalSpy> 0012 0013 class QModelIndex; 0014 0015 namespace TestUtils 0016 { 0017 0018 class InsertRemoveModelSpy 0019 { 0020 public: 0021 InsertRemoveModelSpy( QObject* object, const char* beginSignal, const char* doneSignal ); 0022 0023 void check( QModelIndex const& index, int pos ) { check( index, pos, pos ); } 0024 void check( QModelIndex const& index, int first, int last ); 0025 0026 private: 0027 QSignalSpy beginSpy; 0028 QSignalSpy doneSpy; 0029 }; 0030 0031 } // namespace TestUtils 0032 0033 #endif // K3B_TEST_UTILS_H