- CompactMailDelegate: card-based view for narrow panels (<420px) * Avatar with hash-based color, sender + date (relative format) * Subject line with attachment icon * Action buttons: flag, delete, category, more (context menu) * Unread highlight with light blue background + bold sender - MailListView: automatic switch between tree/table (wide) and list/cards (narrow) * QStackedWidget with QTreeView + QListView sharing same proxy model * resizeEvent threshold at 420px * Signals forwarded to MainMainWindow for actions - FolderTreeDelegate: custom paint for folder tree * Unread count badge (blue pill) right-aligned on folder nodes * Account nodes bold, folder nodes normal weight * Proper indentation per depth level - MailItemDao::countUnreadByFolderId() for real-time unread counts - MainMainWindow handlers for compact actions (flag, delete, category, more menu)
20 lines
685 B
C++
20 lines
685 B
C++
#include <iostream>
|
|
#include "src/core/models/account.h"
|
|
|
|
int main() {
|
|
QString original = "mySecretPassword123!";
|
|
QString encrypted = Account::encryptPassword(original);
|
|
QString decrypted = Account::decryptPassword(encrypted);
|
|
|
|
std::cout << "Original: " << original.toStdString() << std::endl;
|
|
std::cout << "Encrypted: " << encrypted.toStdString() << std::endl;
|
|
std::cout << "Decrypted: " << decrypted.toStdString() << std::endl;
|
|
|
|
if (decrypted == original) {
|
|
std::cout << "SUCCESS: Encryption/decryption round-trip matches." << std::endl;
|
|
return 0;
|
|
} else {
|
|
std::cout << "FAIL: mismatch." << std::endl;
|
|
return 1;
|
|
}
|
|
} |