Skip to content

Commit

Permalink
Merge pull request #18 from Qudix/dev
Browse files Browse the repository at this point in the history
Remove remaining boost headers
  • Loading branch information
Al12rs authored Jul 17, 2021
2 parents a718606 + 8d84fbd commit 21eea02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/handlerstorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <QFileInfo>
#include <QDir>
#include <QRegularExpression>
#include <boost/assign.hpp>

static const QRegularExpression invalid_arguments("\"?%[0-9]+\"?");

Expand Down
12 changes: 6 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <QMessageBox>
#include <QAbstractButton>
#include <QDesktopServices>
#include <boost/scoped_ptr.hpp>
#include <QJsonDocument>
#include <QJsonObject>
#include <QRegularExpression>
Expand Down Expand Up @@ -40,7 +39,6 @@ void logHandler(QtMsgType type, const QMessageLogContext &context, const QString
file.write(qUtf8Printable(QString("[%1] %2\n").arg(QDateTime::currentDateTime().toString()).arg(message)));
}


void handleLink(const QString &executable, const QString &arguments, const QString &link)
{
QString quotedExecutable(executable);
Expand All @@ -61,7 +59,8 @@ void handleLink(const QString &executable, const QString &arguments, const QStri

HandlerStorage *registerExecutable(const QDir &storagePath,
const QString &handlerPath,
const QString &handlerArgs) {
const QString &handlerArgs)
{
HandlerStorage *storage = nullptr;
if (!handlerPath.isEmpty() && !handlerPath.endsWith("nxmhandler.exe", Qt::CaseInsensitive)) {
// a foreign or global nxm handler, register ourself and use that handler as
Expand All @@ -80,7 +79,8 @@ HandlerStorage *registerExecutable(const QDir &storagePath,
// ensure a nxmhandler.exe is registered to handle nxm-links, then load the
// handler storage for that registered instance
// (even if it's different from the one actually being run)
HandlerStorage *loadStorage(bool forceReg) {
HandlerStorage *loadStorage(bool forceReg)
{
HandlerStorage *storage = nullptr;

QDir globalStorage(
Expand Down Expand Up @@ -215,14 +215,14 @@ int main(int argc, char *argv[])
bool forceReg = (args.count() == 1) ||
((args.count() > 1) && args.at(1) == "forcereg");

boost::scoped_ptr<HandlerStorage> storage(loadStorage(forceReg));
std::unique_ptr<HandlerStorage> storage(loadStorage(forceReg));
if (storage.get() == nullptr) {
return 0;
}

// Log the arguments
qDebug(qUtf8Printable( "\"" + args.join("\" \"") + "\""));

// No other logs, close the log
NxmHandler::LoggerDeinit();

Expand Down

0 comments on commit 21eea02

Please sign in to comment.