- ImapSynchronizer::syncFolder(): detecta eliminados (UIDs locales no en servidor), fetch nuevos (sinceUid), actualiza flags (FLAGS batch) - fetchAllUids(): SELECT + SEARCH ALL para lista completa UIDs servidor - parseAndUpdateFlags(): FETCH FLAGS en lotes 100, update DB si cambió read/flagged - AccountSetupDialog: integra ConnectionWizard para IMAP/POP3 con test de conexión real - IMAP FETCH parser robusto: logging respuesta servidor + fallback UID-by-UID - Fix: FETCH failed logging muestra first/last UID + respuesta truncada
73 lines
1.8 KiB
C++
73 lines
1.8 KiB
C++
#ifndef CONNECTIONWIZARD_H
|
|
#define CONNECTIONWIZARD_H
|
|
|
|
#include <QWizard>
|
|
#include <QLineEdit>
|
|
#include <QComboBox>
|
|
#include <QCheckBox>
|
|
#include <QIntValidator>
|
|
#include <QLabel>
|
|
#include <QVBoxLayout>
|
|
#include <QFormLayout>
|
|
#include <QPushButton>
|
|
#include <QGroupBox>
|
|
#include <QRadioButton>
|
|
#include "core/models/account.h"
|
|
#include "services/accountservice.h"
|
|
|
|
class ConnectionWizard : public QWizard {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ConnectionWizard(QWidget *parent = nullptr, AccountService *accountService = nullptr);
|
|
~ConnectionWizard() override = default;
|
|
|
|
// Retrieve the filled connection settings
|
|
Account::ConnectionSettings connectionSettings() const;
|
|
|
|
signals:
|
|
void settingsReady(const Account::ConnectionSettings &settings);
|
|
|
|
private slots:
|
|
void accept() override;
|
|
void onTestClicked();
|
|
|
|
private:
|
|
void setupPageIntro();
|
|
void setupPageIncoming();
|
|
void setupPageOutgoing();
|
|
void setupPageAuth();
|
|
void setupPageTest();
|
|
|
|
// Page pointers (optional)
|
|
QWizardPage *m_introPage;
|
|
QWizardPage *m_incomingPage;
|
|
QWizardPage *m_outgoingPage;
|
|
QWizardPage *m_authPage;
|
|
QWizardPage *m_testPage;
|
|
|
|
// Incoming fields
|
|
QComboBox *m_incomingTypeCombo; // IMAP, POP3
|
|
QLineEdit *m_incomingHostEdit;
|
|
QLineEdit *m_incomingPortEdit;
|
|
QCheckBox *m_incomingSslCheck;
|
|
|
|
// Outgoing fields
|
|
QLineEdit *m_outgoingHostEdit;
|
|
QLineEdit *m_outgoingPortEdit;
|
|
QCheckBox *m_outgoingSslCheck;
|
|
|
|
// Auth fields
|
|
QLineEdit *m_usernameEdit;
|
|
QLineEdit *m_passwordEdit;
|
|
QComboBox *m_authMethodCombo; // Plain, Login, OAuth2 (if supported)
|
|
|
|
// Test page
|
|
QLabel *m_testStatusLabel;
|
|
QLabel *m_testDetailLabel;
|
|
QPushButton *m_testButton;
|
|
|
|
AccountService *m_accountService;
|
|
};
|
|
|
|
#endif // CONNECTIONWIZARD_H
|