Commit aaf37085 authored by Laurent Montel's avatar Laurent Montel 😁

Remove unused debug

parent ef7cb307
......@@ -51,8 +51,6 @@ ProviderPage::ProviderPage(KAssistantDialog *parent) :
m_downloadManager->setSearchOrder(KNS3::DownloadManager::Alphabetical);
connect(ui.listView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &ProviderPage::selectionChanged);
qCDebug(ACCOUNTWIZARD_LOG);
}
void ProviderPage::startFetchingData()
......@@ -62,7 +60,6 @@ void ProviderPage::startFetchingData()
void ProviderPage::fillModel(const KNS3::Entry::List &list)
{
qCDebug(ACCOUNTWIZARD_LOG);
m_model->removeRows(m_model->indexFromItem(m_fetchItem).row(), 1);
// KNS3::Entry::Entry() is private, so we need to save the whole list.
......
......@@ -74,7 +74,6 @@ public:
AddEditBlog::AddEditBlog(int blog_id, QWidget *parent)
: QDialog(parent), d(new Private)
{
qCDebug(BLOGILO_LOG);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
d->mainW = new QTabWidget(this);
d->ui.setupUi(d->mainW);
......@@ -146,7 +145,6 @@ void AddEditBlog::enableAutoConfBtn()
void AddEditBlog::autoConfigure()
{
qCDebug(BLOGILO_LOG);
if (d->ui.txtUrl->text().isEmpty() || d->ui.txtUser->text().isEmpty() || d->ui.txtPass->text().isEmpty()) {
qCDebug(BLOGILO_LOG) << "Username, Password or URL not set!";
KMessageBox::sorry(this, i18n("You have to set the username, password and URL of your blog or website."),
......@@ -260,7 +258,6 @@ void AddEditBlog::gotHtml(KJob *job)
void AddEditBlog::gotXmlRpcTest(KJob *job)
{
qCDebug(BLOGILO_LOG);
d->mFetchAPITimer->deleteLater();
if (!job) {
return;
......@@ -328,7 +325,6 @@ void AddEditBlog::fetchBlogId()
void AddEditBlog::handleFetchIDTimeout()
{
qCDebug(BLOGILO_LOG);
if (d->mFetchBlogIdTimer) {
d->mFetchBlogIdTimer->stop();
}
......@@ -345,7 +341,6 @@ void AddEditBlog::handleFetchIDTimeout()
void AddEditBlog::handleFetchAPITimeout()
{
qCDebug(BLOGILO_LOG);
d->mFetchAPITimer->deleteLater();
d->mFetchAPITimer = Q_NULLPTR;
hideWaitWidget();
......@@ -479,7 +474,6 @@ void AddEditBlog::slotReturnPressed()
AddEditBlog::~AddEditBlog()
{
qCDebug(BLOGILO_LOG);
delete d;
}
......
......@@ -82,7 +82,6 @@ Backend::Backend(int blog_id, QObject *parent)
Backend::~Backend()
{
qCDebug(BLOGILO_LOG);
delete d;
}
......@@ -347,7 +346,6 @@ void Backend::error(KBlog::Blog::ErrorType type, const QString &errorMessage)
void Backend::slotMediaError(KBlog::Blog::ErrorType type, const QString &errorMessage,
KBlog::BlogMedia *media)
{
qCDebug(BLOGILO_LOG);
QString errType = errorTypeToString(type);
errType += errorMessage;
qCDebug(BLOGILO_LOG) << errType;
......
......@@ -151,7 +151,6 @@ void BilboPost::setCategoryList(const QVector<Category> &list)
void BilboPost::setProperties(const BilboPost &postProp)
{
qCDebug(BLOGILO_LOG);
this->setCreationDateTime(postProp.creationDateTime());
this->setModificationDateTime(postProp.modificationDateTime());
this->setLink(postProp.link());
......
......@@ -232,12 +232,10 @@ bool BloggerPrivate::handleError(KGAPI2::Job *job)
Blogger::Blogger(const QUrl &server, QObject *parent)
: Blog(server, *new BloggerPrivate(this), parent)
{
qCDebug(BLOGILO_LOG);
}
Blogger::~Blogger()
{
qCDebug(BLOGILO_LOG);
}
QString Blogger::interfaceName() const
......
......@@ -54,7 +54,6 @@ BilboBrowser::BilboBrowser(QWidget *parent)
BilboBrowser::~BilboBrowser()
{
qCDebug(BLOGILO_LOG);
}
void BilboBrowser::createUi(QWidget *parent)
......
......@@ -53,7 +53,6 @@ StyleGetter::StyleGetter(const int blogid, QObject *parent)
mParent(Q_NULLPTR),
b(Q_NULLPTR)
{
qCDebug(BLOGILO_LOG);
BilboBlog *tempBlog = DBMan::self()->blog(blogid);
if (tempBlog->isError()) {
KMessageBox::detailedError(mParent, i18n("Cannot fetch the selected blog style."),
......@@ -90,14 +89,12 @@ StyleGetter::StyleGetter(const int blogid, QObject *parent)
StyleGetter::~StyleGetter()
{
qCDebug(BLOGILO_LOG);
}
QString StyleGetter::styledHtml(const int blogid,
const QString &title,
const QString &content)
{
qCDebug(BLOGILO_LOG);
QString url = QStringLiteral("blogilo/%1/").arg(blogid);
url = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + url;
QUrl dest(url);
......@@ -132,7 +129,6 @@ QString StyleGetter::styledHtml(const int blogid,
void StyleGetter::slotTempPostPublished(int blogId, BilboPost *post)
{
qCDebug(BLOGILO_LOG);
QUrl postUrl;
// postUrl = post->permaLink();
......@@ -158,7 +154,6 @@ void StyleGetter::slotTempPostPublished(int blogId, BilboPost *post)
void StyleGetter::slotHtmlCopied(KJob *job)
{
qCDebug(BLOGILO_LOG);
if (job->error()) {
KMessageBox::detailedError(mParent, i18n("Cannot get html file."),
job->errorString());
......@@ -224,7 +219,6 @@ void StyleGetter::slotTempPostRemoved(int blog_id, const BilboPost &post)
void StyleGetter::generateRandomPostStrings()
{
qCDebug(BLOGILO_LOG);
srand(time(Q_NULLPTR));
int postRandomNumber = rand();
mPostTitle = QStringLiteral("%1%2").arg(QLatin1String(POST_TITLE)).arg(postRandomNumber);
......@@ -233,7 +227,6 @@ void StyleGetter::generateRandomPostStrings()
void StyleGetter::slotError(const QString &errMsg)
{
qCDebug(BLOGILO_LOG);
KMessageBox::detailedError(mParent, i18n("An error occurred in the latest transaction."), errMsg);
b->deleteLater();
}
......
......@@ -108,7 +108,6 @@ void BlogiloComposerWebEngineEditor::setReadOnly(bool _readOnly)
QList< BilboMedia * > BlogiloComposerWebEngineEditor::getLocalImages()
{
qCDebug(BLOGILO_LOG);
QList< BilboMedia * > list;
#if 0
QWebElementCollection images = view()->page()->mainFrame()->findAllElements(QStringLiteral("img"));
......
......@@ -96,7 +96,6 @@ DBMan::DBMan()
DBMan::~DBMan()
{
qCDebug(BLOGILO_LOG);
d->db.close();
if (d->useWallet) {
d->mWallet->deleteLater();
......@@ -138,7 +137,6 @@ void DBMan::reloadBlogList()
bool DBMan::connectDB()
{
qCDebug(BLOGILO_LOG);
if (d->db.isOpen()) {
return true;
}
......@@ -166,7 +164,6 @@ Will create configuration database!
*/
bool DBMan::createDB()
{
qCDebug(BLOGILO_LOG);
bool ret = true;
if (!connectDB()) {
exit(1);
......@@ -537,7 +534,6 @@ int DBMan::addPost(const BilboPost &post, int blog_id)
bool DBMan::editPost(const BilboPost &post, int blog_id)
{
qCDebug(BLOGILO_LOG);
QSqlQuery q;
q.prepare(QStringLiteral("UPDATE post SET author=?, title=?, content=?, text_more=?, c_time=?, m_time=?,\
is_private=?, is_comment_allowed=?, is_trackback_allowed=?, link=?, perma_link=?, summary=?,\
......@@ -753,7 +749,6 @@ int DBMan::saveTempEntry(const BilboPost &post, int blog_id)
int DBMan::saveTemp_LocalEntry(const BilboPost &basePost, int blog_id, LocalPostState state)
{
qCDebug(BLOGILO_LOG);
QSqlQuery q;
BilboPost post = basePost;
// qCDebug(BLOGILO_LOG)<<"postId: "<<post.postId();
......@@ -902,7 +897,6 @@ int DBMan::saveTemp_LocalEntry(const BilboPost &basePost, int blog_id, LocalPost
bool DBMan::removeLocalEntry(const BilboPost &post)
{
qCDebug(BLOGILO_LOG);
QSqlQuery q;
q.prepare(QStringLiteral("DELETE FROM local_post WHERE local_id=?"));
q.addBindValue(post.localId());
......@@ -916,7 +910,6 @@ bool DBMan::removeLocalEntry(const BilboPost &post)
bool DBMan::removeLocalEntry(int local_id)
{
qCDebug(BLOGILO_LOG);
QSqlQuery q;
q.prepare(QStringLiteral("DELETE FROM local_post WHERE local_id=?"));
q.addBindValue(local_id);
......@@ -930,7 +923,6 @@ bool DBMan::removeLocalEntry(int local_id)
bool DBMan::removeTempEntry(const BilboPost &post)
{
qCDebug(BLOGILO_LOG);
QSqlQuery q;
q.prepare(QStringLiteral("DELETE FROM temp_post WHERE local_id=?"));
q.addBindValue(post.localId());
......@@ -945,7 +937,6 @@ bool DBMan::removeTempEntry(const BilboPost &post)
bool DBMan::clearTempEntries()
{
qCDebug(BLOGILO_LOG);
QSqlQuery q;
bool res = q.exec(QStringLiteral("DELETE FROM temp_post"));
if (!res) {
......
......@@ -29,12 +29,10 @@ int __currentBlogId;
void global_init()
{
qCDebug(BLOGILO_LOG);
__currentBlogId = -1;
}
void global_end()
{
qCDebug(BLOGILO_LOG);
delete DBMan::self();
}
......@@ -227,7 +227,6 @@ void MainWindow::setupActions()
void MainWindow::loadTempPosts()
{
qCDebug(BLOGILO_LOG);
QMap<BilboPost *, int> tempList = DBMan::self()->listTempPosts();
const int count = tempList.count();
if (count > 0) {
......@@ -291,8 +290,6 @@ void MainWindow::currentBlogChanged(QAction *act)
void MainWindow::slotCreateNewPost()
{
qCDebug(BLOGILO_LOG);
tabPosts->setCurrentWidget(createPostEntry(mCurrentBlogId, BilboPost()));
if (mCurrentBlogId == -1) {
if (!blogs->items().isEmpty()) {
......@@ -409,7 +406,6 @@ void MainWindow::setupSystemTray()
void MainWindow::slotPostTitleChanged(const QString &title)
{
// qCDebug(BLOGILO_LOG);
tabPosts->setTabText(tabPosts->currentIndex(), title);
}
......@@ -452,7 +448,6 @@ void MainWindow::slotActivePostChanged(int index)
void MainWindow::slotPublishPost()
{
qCDebug(BLOGILO_LOG);
if (mCurrentBlogId == -1) {
KMessageBox::sorry(this, i18n("You have to select a blog to publish this post to."));
return;
......@@ -492,7 +487,7 @@ void MainWindow::slotRemoveAllExclude(int pos)
void MainWindow::slotRemovePostEntry(int pos)
{
qCDebug(BLOGILO_LOG);
PostEntry *widget = qobject_cast<PostEntry *>(tabPosts->widget(pos));
......@@ -516,14 +511,14 @@ void MainWindow::slotRemovePostEntry(int pos)
void MainWindow::slotNewPostOpened(BilboPost &newPost, int blog_id)
{
qCDebug(BLOGILO_LOG);
QWidget *w = createPostEntry(blog_id, newPost);
tabPosts->setCurrentWidget(w);
}
void MainWindow::slotSavePostLocally()
{
qCDebug(BLOGILO_LOG);
if (activePost && (tabPosts->count() > 0)) {
toolbox->getFieldsValue(activePost->currentPost());
activePost->saveLocally();
......@@ -541,7 +536,7 @@ void MainWindow::slotError(const QString &errorMessage)
void MainWindow::writeConfigs()
{
qCDebug(BLOGILO_LOG);
if (toolboxDock->isVisible()) {
Settings::setShowToolboxOnStart(true);
} else {
......@@ -580,7 +575,7 @@ void MainWindow::keyPressEvent(QKeyEvent *event)
void MainWindow::postManipulationDone(bool isError, const QString &customMessage)
{
qCDebug(BLOGILO_LOG);
if (isError) {
KMessageBox::detailedError(this, i18n("Submitting post failed"), customMessage);
} else {
......@@ -630,7 +625,7 @@ void MainWindow::slotBusy(bool isBusy)
QWidget *MainWindow::createPostEntry(int blog_id, const BilboPost &post)
{
qCDebug(BLOGILO_LOG);
PostEntry *temp = new PostEntry(this);
temp->setAttribute(Qt::WA_DeleteOnClose);
temp->setCurrentPost(post);
......
......@@ -114,7 +114,7 @@ PostEntry::~PostEntry()
void PostEntry::settingsChanged()
{
qCDebug(BLOGILO_LOG);
d->mTimer->setInterval(Settings::autosaveInterval() * MINUTE);
if (Settings::autosaveInterval()) {
d->mTimer->start();
......@@ -294,7 +294,7 @@ void PostEntry::setCurrentPostBlogId(int blog_id)
void PostEntry::setCurrentPostFromEditor()
{
if (d->isPostContentModified) {
qCDebug(BLOGILO_LOG);
const QString &str = htmlContent();
d->mCurrentPost.setContent(str);
d->isPostContentModified = false;
......@@ -323,7 +323,7 @@ Qt::LayoutDirection PostEntry::defaultLayoutDirection() const
void PostEntry::setDefaultLayoutDirection(Qt::LayoutDirection direction)
{
qCDebug(BLOGILO_LOG);
d->tabWidget->setLayoutDirection(direction);
d->txtTitle->setLayoutDirection(direction);
}
......@@ -512,7 +512,7 @@ void PostEntry::saveTemporary()
void PostEntry::slotPostModified()
{
qCDebug(BLOGILO_LOG);
disconnect(this, &PostEntry::textChanged, this, &PostEntry::slotPostModified);
// disconnect( txtTitle, SIGNAL(textChanged(QString)), this, SLOT(slotPostModified()) );
// Q_EMIT postModified();
......
......@@ -79,7 +79,7 @@ bool SyncUploader::uploadMedia(Backend *backend, BilboMedia *media)
void SyncUploader::slotMediaFileUploaded(BilboMedia *media)
{
if (media && media == d->mCurrentMedia) {
qCDebug(BLOGILO_LOG);
d->success = true;
d->loop->exit();
}
......
......@@ -423,7 +423,7 @@ void Toolbox::setButtonsIcon()
void Toolbox::reloadLocalPosts()
{
qCDebug(BLOGILO_LOG);
localEntries->clear();
......
......@@ -28,31 +28,31 @@
WaitWidget::WaitWidget(QWidget *parent)
: QDialog(parent)
{
qCDebug(BLOGILO_LOG);
setupUi(this);
}
WaitWidget::~WaitWidget()
{
qCDebug(BLOGILO_LOG);
}
void WaitWidget::setText(const QString &text)
{
qCDebug(BLOGILO_LOG);
operationNameLabel->setText(text);
setWindowTitle(text);
}
void WaitWidget::setMaxJobs(int max)
{
qCDebug(BLOGILO_LOG);
progressBar->setMaximum(max);
}
void WaitWidget::jobDone()
{
qCDebug(BLOGILO_LOG);
progressBar->setValue(progressBar->value() + 1);
}
......
......@@ -91,7 +91,7 @@ bool KAddressBookPart::openFile()
void KAddressBookPart::guiActivateEvent(KParts::GUIActivateEvent *e)
{
qCDebug(KADDRESSBOOK_LOG);
KParts::ReadOnlyPart::guiActivateEvent(e);
mMainWidget->initializePluginActions();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment