Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Telemetry
KUserFeedback
Commits
a7568d74
Commit
a7568d74
authored
Feb 19, 2017
by
Volker Krause
Browse files
Move ProviderPrivate declaration into its own file
parent
dfdad704
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/provider/core/provider.cpp
View file @
a7568d74
...
...
@@ -17,12 +17,12 @@
#include
<config-userfeedback-version.h>
#include
"abstractdatasource.h"
#include
"provider.h"
#include
"provider_p.h"
#include
"abstractdatasource.h"
#include
"surveyinfo.h"
#include
<QCoreApplication>
#include
<QDateTime>
#include
<QDebug>
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
#include
<QJsonArray>
...
...
@@ -33,9 +33,6 @@
#include
<QNetworkReply>
#include
<QNetworkRequest>
#include
<QSettings>
#include
<QStringList>
#include
<QTime>
#include
<QTimer>
#include
<QUrl>
#include
<algorithm>
...
...
@@ -43,59 +40,6 @@
using
namespace
UserFeedback
;
namespace
UserFeedback
{
class
ProviderPrivate
{
public:
ProviderPrivate
(
Provider
*
qq
);
~
ProviderPrivate
();
void
reset
();
int
currentApplicationTime
()
const
;
void
load
();
void
store
();
void
aboutToQuit
();
QByteArray
jsonData
()
const
;
void
scheduleNextSubmission
();
void
submitFinished
();
void
selectSurvey
(
const
SurveyInfo
&
survey
)
const
;
void
scheduleEncouragement
();
void
emitShowEncouragementMessage
();
Provider
*
q
;
QString
productId
;
QTimer
submissionTimer
;
QNetworkAccessManager
*
networkAccessManager
;
QUrl
serverUrl
;
QDateTime
lastSubmitTime
;
int
submissionInterval
;
Provider
::
StatisticsCollectionMode
statisticsMode
;
int
surveyInterval
;
QDateTime
lastSurveyTime
;
QStringList
completedSurveys
;
QTime
startTime
;
int
startCount
;
int
usageTime
;
QTimer
encouragementTimer
;
int
encouragementStarts
;
int
encouragementTime
;
int
encouragementDelay
;
bool
encouragementDisplayed
;
QVector
<
AbstractDataSource
*>
dataSources
;
};
}
ProviderPrivate
::
ProviderPrivate
(
Provider
*
qq
)
:
q
(
qq
)
,
networkAccessManager
(
Q_NULLPTR
)
...
...
src/provider/core/provider.h
View file @
a7568d74
...
...
@@ -23,7 +23,6 @@
#include
<QObject>
#include
<QUrl>
namespace
UserFeedback
{
class
AbstractDataSource
;
...
...
src/provider/core/provider_p.h
0 → 100644
View file @
a7568d74
/*
Copyright (C) 2017 Volker Krause <vkrause@kde.org>
This program 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 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 Library 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 <http://www.gnu.org/licenses/>.
*/
#ifndef USERFEEDBACK_PROVIDER_P_H
#define USERFEEDBACK_PROVIDER_P_H
#include
"provider.h"
#include
<QDateTime>
#include
<QStringList>
#include
<QTime>
#include
<QTimer>
#include
<QVector>
QT_BEGIN_NAMESPACE
class
QNetworkAccessManager
;
QT_END_NAMESPACE
namespace
UserFeedback
{
class
ProviderPrivate
{
public:
ProviderPrivate
(
Provider
*
qq
);
~
ProviderPrivate
();
void
reset
();
int
currentApplicationTime
()
const
;
void
load
();
void
store
();
void
aboutToQuit
();
QByteArray
jsonData
()
const
;
void
scheduleNextSubmission
();
void
submitFinished
();
void
selectSurvey
(
const
SurveyInfo
&
survey
)
const
;
void
scheduleEncouragement
();
void
emitShowEncouragementMessage
();
Provider
*
q
;
QString
productId
;
QTimer
submissionTimer
;
QNetworkAccessManager
*
networkAccessManager
;
QUrl
serverUrl
;
QDateTime
lastSubmitTime
;
int
submissionInterval
;
Provider
::
StatisticsCollectionMode
statisticsMode
;
int
surveyInterval
;
QDateTime
lastSurveyTime
;
QStringList
completedSurveys
;
QTime
startTime
;
int
startCount
;
int
usageTime
;
QTimer
encouragementTimer
;
int
encouragementStarts
;
int
encouragementTime
;
int
encouragementDelay
;
bool
encouragementDisplayed
;
QVector
<
AbstractDataSource
*>
dataSources
;
};
}
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment