diff --git a/dialogs/coverbrowserdialog.h b/dialogs/coverbrowserdialog.h index 6fa1aba..62afdcc 100644 --- a/dialogs/coverbrowserdialog.h +++ b/dialogs/coverbrowserdialog.h @@ -1,79 +1,79 @@ /* AUDEX CDDA EXTRACTOR * Copyright (C) 2007-2015 Marco Nelles (audex@maniatek.com) * * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef COVERBROWSERWIDGET_H -#define COVERBROWSERWIDGET_H +#ifndef COVERBROWSERDIALOG_H +#define COVERBROWSERDIALOG_H #include #include #include #include #include #include "preferences.h" #include "utils/coverfetcher.h" #include "dialogs/errordialog.h" #include "ui_coverbrowserwidgetUI.h" class CoverBrowserDialog : public QDialog { Q_OBJECT public: CoverBrowserDialog(QWidget *parent = 0); ~CoverBrowserDialog(); inline int count() { return cover_fetcher.count(); } public slots: void fetchThumbnails(const QString& searchstring, const int fetchCount = 0); void startFetchCover(const int no); signals: void coverFetched(const QByteArray& cover); void allCoverThumbnailsFetched(); void nothingFetched(); private slots: void select_this(QListWidgetItem* item); void enable_select_button(); void add_item(const QByteArray& cover, const QString& caption, int no); void all_fetched(); void nothing_fetched(); void cover_fetched(const QByteArray& cover); void error(const QString& description, const QString& solution); void slotAccepted(); private: Ui::CoverBrowserWidgetUI ui; CoverFetcher cover_fetcher; QPushButton *okButton; void setup(); }; #endif diff --git a/dialogs/errordialog.h b/dialogs/errordialog.h index d0fc462..7b5b751 100644 --- a/dialogs/errordialog.h +++ b/dialogs/errordialog.h @@ -1,15 +1,15 @@ #ifndef ERROR_DIALOG_H #define ERROR_DIALOG_H -#include +#include #include class QWidget; namespace ErrorDialog { extern void show(QWidget *parent, const QString &message, const QString &details, const QString &caption=QString()); } #endif diff --git a/test/devicestest.cpp b/test/devicestest.cpp index a5ea752..06cc50e 100644 --- a/test/devicestest.cpp +++ b/test/devicestest.cpp @@ -1,63 +1,63 @@ /* Copyright (C) 2016 Leslie Zhai This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "devicestest.h" -#include -#include +#include +#include #include void DevicesTest::initTestCase() { // Purposely use OpticalDrive QList list = Solid::Device::listFromType(Solid::DeviceInterface::OpticalDrive, QString()); for (int i = 0; i < list.count(); i++) { const QString udi = list.value(i).udi(); Solid::Device device(udi); qDebug() << "Device found:" << device.udi(); OpticalAudioDisc *disc = new OpticalAudioDisc; disc->name = udi; disc->device = device; m_discs << disc; } } void DevicesTest::cleanupTestCase() { } void DevicesTest::testEject() { if (m_discs.isEmpty()) return; OpticalAudioDisc *disc = m_discs[0]; if (!disc) return; qDebug() << "DEBUG:" << __PRETTY_FUNCTION__ << disc->name; // Purposely use OpticalDrive's parent Solid::Device device(disc->device.parentUdi()); if (device.as()) device.as()->eject(); } QTEST_GUILESS_MAIN(DevicesTest) diff --git a/utils/cuesheetwriter.h b/utils/cuesheetwriter.h index b5bdb51..0140534 100644 --- a/utils/cuesheetwriter.h +++ b/utils/cuesheetwriter.h @@ -1,49 +1,49 @@ /* AUDEX CDDA EXTRACTOR * Copyright (C) 2007-2015 Marco Nelles (audex@maniatek.com) * * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef CUEFILEWRITER_H -#define CUEFILEWRITER_H +#ifndef CUESHEETWRITER_H +#define CUESHEETWRITER_H #include #include #include #include #include "config.h" #include "../models/cddamodel.h" #define FRAMES2SEC(frames) ((frames) / 75) class CueSheetWriter : public QObject { Q_OBJECT public: CueSheetWriter(CDDAModel *model); ~CueSheetWriter(); QStringList cueSheet(const QString& binFilename) const; QStringList cueSheet(const QStringList& filenames) const; private: CDDAModel *model; QString p_filetype(const QString& filename) const; }; #endif