• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mcallegari / qlcplus / 10982433547

22 Sep 2024 03:44PM UTC coverage: 31.991% (-0.004%) from 31.995%
10982433547

push

github

mcallegari
ui: more Qt6 deprecation fixes

0 of 18 new or added lines in 3 files covered. (0.0%)

9 existing lines in 4 files now uncovered.

14032 of 43863 relevant lines covered (31.99%)

27064.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.21
/ui/src/aboutbox.cpp
1
/*
2
  Q Light Controller
3
  aboutbox.cpp
4

5
  Copyright (C) Heikki Junnila
6

7
  Licensed under the Apache License, Version 2.0 (the "License");
8
  you may not use this file except in compliance with the License.
9
  You may obtain a copy of the License at
10

11
      http://www.apache.org/licenses/LICENSE-2.0.txt
12

13
  Unless required by applicable law or agreed to in writing, software
14
  distributed under the License is distributed on an "AS IS" BASIS,
15
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
  See the License for the specific language governing permissions and
17
  limitations under the License.
18
*/
19

20
#include <QUrl>
21
#include <QDebug>
22
#include <QLabel>
23
#include <QTimer>
24
#include <QAction>
25
#include <QMessageBox>
26
#include <QDesktopServices>
27

28
#include "qlcconfig.h"
29
#include "aboutbox.h"
30

31
AboutBox::AboutBox(QWidget* parent) : QDialog (parent)
3✔
32
{
33
    setupUi(this);
3✔
34

35
    QAction* action = new QAction(this);
3✔
36
    action->setShortcut(QKeySequence(QKeySequence::Close));
3✔
37
    connect(action, SIGNAL(triggered(bool)), this, SLOT(reject()));
3✔
38
    addAction(action);
3✔
39

40
    m_titleLabel->setText(APPNAME);
3✔
41
    m_versionLabel->setText(APPVERSION);
3✔
42
    m_copyrightLabel->setText(QString("Copyright &copy; <B>Heikki Junnila, Massimo Callegari</B> %1")
6✔
43
                              .arg(tr("and contributors:")));
6✔
44
    m_websiteLabel->setText(tr("Website: %1").arg("<A HREF=\"http://www.qlcplus.org/\">http://www.qlcplus.org/</A>"));
3✔
45
    connect(m_websiteLabel, SIGNAL(linkActivated(QString)),
3✔
46
            this, SLOT(slotWebsiteClicked()));
47
    connect(m_qtButton, SIGNAL(clicked()),
3✔
48
            this, SLOT(slotAboutQt()));
49

50
    connect(m_contributors, SIGNAL(itemClicked(QListWidgetItem*)),
3✔
51
            this, SLOT(slotItemClicked()));
52
    m_contributors->clear();
3✔
53
    m_contributors->addItem("Contributors:");
6✔
54
    m_contributors->addItem("Jano Svitok");
6✔
55
    m_contributors->addItem("David Garyga");
6✔
56
    m_contributors->addItem(QString::fromUtf8("Lukas Jähn"));
6✔
57
    m_contributors->addItem("Robert Box");
6✔
58
    m_contributors->addItem("Thomas Achtner");
6✔
59
    m_contributors->addItem("Joep Admiraal");
6✔
60
    m_contributors->addItem("Oliver Ruempelein");
6✔
61
    m_contributors->addItem("Jannis Achstetter");
6✔
62
    m_contributors->addItem("Stefan Riemens");
6✔
63
    m_contributors->addItem("Florian Euchner");
6✔
64
    m_contributors->addItem("Bartosz Grabias");
6✔
65
    m_contributors->addItem("NiKoyes");
6✔
66
    m_contributors->addItem("Heiko Fanieng");
6✔
67
    m_contributors->addItem("Raymond Van Laake");
6✔
68
    m_contributors->addItem(QString::fromUtf8("Luis García Tornel"));
6✔
69
    m_contributors->addItem("Jan Lachman");
6✔
70
    m_contributors->addItem("Nuno Almeida");
6✔
71
    m_contributors->addItem("Santiago Benejam Torres");
6✔
72
    m_contributors->addItem(QString::fromUtf8("Jérôme Lebleu"));
6✔
73
    m_contributors->addItem("Koichiro Saito");
6✔
74
    m_contributors->addItem("Karri Kaksonen");
6✔
75
    m_contributors->addItem("Stefan Krupop");
6✔
76
    m_contributors->addItem("Nathan Durnan");
6✔
77
    m_contributors->addItem("Giorgio Rebecchi");
6✔
78
    m_contributors->addItem("Klaus Weidenbach");
6✔
79
    m_contributors->addItem("Stefan Krumm");
6✔
80
    m_contributors->addItem(QString::fromUtf8("Christian Sühs"));
6✔
81
    m_contributors->addItem("Simon Newton");
6✔
82
    m_contributors->addItem("Christopher Staite");
6✔
83
    m_contributors->addItem("Lutz Hillebrand");
6✔
84
    m_contributors->addItem("Matthew Jaggard");
6✔
85
    m_contributors->addItem("Ptit Vachon");
6✔
86
    m_contributors->addItem("Tolmino");
6✔
87

88
    m_timer = new QTimer(this);
3✔
89
    connect(m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
3✔
90
    m_row = -1;
3✔
91
    m_increment = 1;
3✔
92
    m_timer->start(500);
3✔
93
}
3✔
94

95
AboutBox::~AboutBox()
3✔
96
{
97
}
3✔
98

99
void AboutBox::slotTimeout()
68✔
100
{
101
    if (m_row <= 0)
68✔
102
        m_increment = 1;
2✔
103
    else if (m_row >= m_contributors->count())
66✔
104
        m_increment = -1;
1✔
105

106
    m_row += m_increment;
68✔
107
    m_contributors->scrollToItem(m_contributors->item(m_row));
68✔
108
}
68✔
109

110
void AboutBox::slotItemClicked()
2✔
111
{
112
    if (m_timer != NULL)
2✔
113
    {
114
        m_timer->stop();
1✔
115
        delete m_timer;
1✔
116
        m_timer = NULL;
1✔
117
    }
118
}
2✔
119

120
void AboutBox::slotWebsiteClicked()
×
121
{
UNCOV
122
    QDesktopServices::openUrl(QUrl("http://www.qlcplus.org/"));
×
UNCOV
123
}
×
124

UNCOV
125
void AboutBox::slotAboutQt()
×
126
{
UNCOV
127
    QMessageBox::aboutQt(this, QString(APPNAME));
×
UNCOV
128
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc