aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cidschemehandler.cpp18
-rw-r--r--src/cidschemehandler.h18
-rw-r--r--src/config.cpp18
-rw-r--r--src/config.h18
-rw-r--r--src/htmlbuilder.cpp18
-rw-r--r--src/htmlbuilder.h18
-rw-r--r--src/keymap.cpp18
-rw-r--r--src/keymap.h18
-rw-r--r--src/mailsync.cpp18
-rw-r--r--src/mailsync.h18
-rw-r--r--src/main.cpp50
-rw-r--r--src/mainwindow.cpp21
-rw-r--r--src/mainwindow.h18
-rw-r--r--src/messageview.cpp18
-rw-r--r--src/messageview.h18
-rw-r--r--src/mimeparser.cpp18
-rw-r--r--src/mimeparser.h18
-rw-r--r--src/nmraii.h18
-rw-r--r--src/notmuchworker.cpp18
-rw-r--r--src/notmuchworker.h18
-rw-r--r--src/requestinterceptor.cpp18
-rw-r--r--src/requestinterceptor.h18
-rw-r--r--src/threadcidmap.cpp18
-rw-r--r--src/threadcidmap.h18
-rw-r--r--src/threadlistmodel.cpp18
-rw-r--r--src/threadlistmodel.h18
-rw-r--r--src/types.h18
-rw-r--r--src/version.h.in27
28 files changed, 547 insertions, 1 deletions
diff --git a/src/cidschemehandler.cpp b/src/cidschemehandler.cpp
index b4bb836..ed3ba9e 100644
--- a/src/cidschemehandler.cpp
+++ b/src/cidschemehandler.cpp
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "cidschemehandler.h"
#include <QBuffer>
diff --git a/src/cidschemehandler.h b/src/cidschemehandler.h
index 1231fc6..1ca87f6 100644
--- a/src/cidschemehandler.h
+++ b/src/cidschemehandler.h
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#pragma once
#include <QHash>
diff --git a/src/config.cpp b/src/config.cpp
index 0253a74..de6a783 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "config.h"
#include <QFileInfo>
diff --git a/src/config.h b/src/config.h
index 80f6101..270b780 100644
--- a/src/config.h
+++ b/src/config.h
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#pragma once
#include <QList>
diff --git a/src/htmlbuilder.cpp b/src/htmlbuilder.cpp
index 89501ea..ccb9171 100644
--- a/src/htmlbuilder.cpp
+++ b/src/htmlbuilder.cpp
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "htmlbuilder.h"
#include <QRegularExpression>
diff --git a/src/htmlbuilder.h b/src/htmlbuilder.h
index ff62c69..6e306dd 100644
--- a/src/htmlbuilder.h
+++ b/src/htmlbuilder.h
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#pragma once
#include <QList>
diff --git a/src/keymap.cpp b/src/keymap.cpp
index 205d2f5..39991dc 100644
--- a/src/keymap.cpp
+++ b/src/keymap.cpp
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "keymap.h"
#include <QSettings>
diff --git a/src/keymap.h b/src/keymap.h
index 3f0f85c..564eb10 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#pragma once
#include <QHash>
diff --git a/src/mailsync.cpp b/src/mailsync.cpp
index fdc433f..b1a5208 100644
--- a/src/mailsync.cpp
+++ b/src/mailsync.cpp
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "mailsync.h"
MailSync::MailSync(const QString &command, QObject *parent)
diff --git a/src/mailsync.h b/src/mailsync.h
index af4acbc..8123ea9 100644
--- a/src/mailsync.h
+++ b/src/mailsync.h
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#pragma once
#include <QObject>
diff --git a/src/main.cpp b/src/main.cpp
index 2c5dc13..4d3ed0a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,14 +1,63 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include <QApplication>
#include <QMessageBox>
#include <QWebEngineUrlScheme>
#include <notmuch.h>
+#include <cstdio>
+#include <cstring>
+
#include "config.h"
#include "mainwindow.h"
+#include "version.h"
int main(int argc, char *argv[])
{
+ // Answered before anything heavier starts: registering web engine schemes
+ // and constructing a QApplication to print one line would be absurd, and
+ // --version has to work on a machine where the GUI cannot open at all.
+ for (int i = 1; i < argc; ++i) {
+ if (std::strcmp(argv[i], "--version") == 0
+ || std::strcmp(argv[i], "-v") == 0) {
+ std::printf("qtmaildir %s\n", QTMAILDIR_VERSION);
+ return 0;
+ }
+ if (std::strcmp(argv[i], "--help") == 0
+ || std::strcmp(argv[i], "-h") == 0) {
+ std::printf(
+ "qtmaildir %s - a Qt6 mail client for notmuch-indexed Maildirs\n"
+ "\n"
+ "Usage: qtmaildir [options]\n"
+ "\n"
+ " -h, --help Show this help and exit\n"
+ " -v, --version Show the version and exit\n"
+ "\n"
+ "Configuration: ~/.config/qtmaildir/qtmaildir.conf\n"
+ "qtmaildir reads a notmuch-indexed Maildir. It does no network\n"
+ "protocol work: fetching and sending are external commands.\n",
+ QTMAILDIR_VERSION);
+ return 0;
+ }
+ }
+
// Custom schemes must be registered before QApplication is constructed.
{
QWebEngineUrlScheme scheme(QByteArrayLiteral("cid"));
@@ -25,6 +74,7 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
app.setApplicationName(QStringLiteral("qtmaildir"));
app.setOrganizationName(QStringLiteral("qtmaildir"));
+ app.setApplicationVersion(QStringLiteral(QTMAILDIR_VERSION));
// Fail loudly on an ABI mismatch rather than crashing later.
if (LIBNOTMUCH_MAJOR_VERSION < 5) {
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index c24a48f..2a484fb 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "mainwindow.h"
#include <QComboBox>
@@ -21,6 +39,7 @@
#include "mimeparser.h"
#include "notmuchworker.h"
#include "threadlistmodel.h"
+#include "version.h"
QStringList MainWindow::registeredActionNames()
{
@@ -184,7 +203,7 @@ void MainWindow::buildUi()
setCentralWidget(central);
resize(1200, 800);
- setWindowTitle(tr("qtmaildir"));
+ setWindowTitle(QStringLiteral("qtmaildir %1").arg(QTMAILDIR_VERSION));
}
void MainWindow::registerActions()
diff --git a/src/mainwindow.h b/src/mainwindow.h
index bbfc3ec..30679bb 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#pragma once
#include <QHash>
diff --git a/src/messageview.cpp b/src/messageview.cpp
index b4ace55..3bb08a0 100644
--- a/src/messageview.cpp
+++ b/src/messageview.cpp
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "messageview.h"
#include <QDesktopServices>
diff --git a/src/messageview.h b/src/messageview.h
index 9f2edb3..f3bd96f 100644
--- a/src/messageview.h
+++ b/src/messageview.h
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#pragma once
#include <QList>
diff --git a/src/mimeparser.cpp b/src/mimeparser.cpp
index 0c457c2..71cfc64 100644
--- a/src/mimeparser.cpp
+++ b/src/mimeparser.cpp
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
// gmime.h pulls in glib's gio headers, which declare a struct field named
// "signals". Qt's <QtCore/qnamespace.h> #defines "signals" to "Q_SIGNALS"
// (unless QT_NO_KEYWORDS is set), so gmime.h must be included before any Qt
diff --git a/src/mimeparser.h b/src/mimeparser.h
index 891478a..64ea0ce 100644
--- a/src/mimeparser.h
+++ b/src/mimeparser.h
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#pragma once
#include <QByteArray>
diff --git a/src/nmraii.h b/src/nmraii.h
index 22ad4ae..1c3e8f1 100644
--- a/src/nmraii.h
+++ b/src/nmraii.h
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#pragma once
#include <notmuch.h>
diff --git a/src/notmuchworker.cpp b/src/notmuchworker.cpp
index ae4cafe..ed97e39 100644
--- a/src/notmuchworker.cpp
+++ b/src/notmuchworker.cpp
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "notmuchworker.h"
#include <notmuch.h>
diff --git a/src/notmuchworker.h b/src/notmuchworker.h
index 2551004..e0c80c6 100644
--- a/src/notmuchworker.h
+++ b/src/notmuchworker.h
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#pragma once
#include <QObject>
diff --git a/src/requestinterceptor.cpp b/src/requestinterceptor.cpp
index 6267b64..63df4fd 100644
--- a/src/requestinterceptor.cpp
+++ b/src/requestinterceptor.cpp
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "requestinterceptor.h"
#include <QWebEngineUrlRequestInfo>
diff --git a/src/requestinterceptor.h b/src/requestinterceptor.h
index 9cc100d..15ca428 100644
--- a/src/requestinterceptor.h
+++ b/src/requestinterceptor.h
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#pragma once
#include <QSet>
diff --git a/src/threadcidmap.cpp b/src/threadcidmap.cpp
index c6f1cc7..7919b8d 100644
--- a/src/threadcidmap.cpp
+++ b/src/threadcidmap.cpp
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "threadcidmap.h"
#include "cidschemehandler.h"
diff --git a/src/threadcidmap.h b/src/threadcidmap.h
index 76bd8b9..5ab5642 100644
--- a/src/threadcidmap.h
+++ b/src/threadcidmap.h
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#pragma once
#include <QHash>
diff --git a/src/threadlistmodel.cpp b/src/threadlistmodel.cpp
index 5acfe0e..c129be1 100644
--- a/src/threadlistmodel.cpp
+++ b/src/threadlistmodel.cpp
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "threadlistmodel.h"
#include <QFont>
diff --git a/src/threadlistmodel.h b/src/threadlistmodel.h
index 2cf8d2e..eb1a7ff 100644
--- a/src/threadlistmodel.h
+++ b/src/threadlistmodel.h
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#pragma once
#include <QAbstractTableModel>
diff --git a/src/types.h b/src/types.h
index da71e19..2de6129 100644
--- a/src/types.h
+++ b/src/types.h
@@ -1,3 +1,21 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#pragma once
#include <QDateTime>
diff --git a/src/version.h.in b/src/version.h.in
new file mode 100644
index 0000000..8d76a3a
--- /dev/null
+++ b/src/version.h.in
@@ -0,0 +1,27 @@
+/*
+ * qtmaildir - a Qt6 mail client for notmuch-indexed Maildirs
+ * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#pragma once
+
+/// Generated from the project() declaration in the top-level CMakeLists.txt.
+/// The version is declared in exactly one place; anything that needs it takes
+/// it from here rather than repeating the literal.
+#define QTMAILDIR_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
+#define QTMAILDIR_VERSION_MINOR @PROJECT_VERSION_MINOR@
+#define QTMAILDIR_VERSION_PATCH @PROJECT_VERSION_PATCH@
+#define QTMAILDIR_VERSION "@PROJECT_VERSION@"