Adapt to changes in c++utilities
This commit is contained in:
parent
66c9250246
commit
66a45f7578
|
@ -210,8 +210,7 @@ int main(int argc, char *argv[])
|
|||
if (qtConfigArgs.areQtGuiArgsPresent()) {
|
||||
#if defined(TAGEDITOR_GUI_QTWIDGETS)
|
||||
return QtGui::runWidgetsGui(argc, argv, qtConfigArgs,
|
||||
defaultFileArg.isPresent() && !defaultFileArg.values().empty() ? fromNativeFileName(defaultFileArg.values().front())
|
||||
: QString(),
|
||||
defaultFileArg.isPresent() && !defaultFileArg.values().empty() ? fromNativeFileName(defaultFileArg.values().front()) : QString(),
|
||||
renamingUtilityArg.isPresent());
|
||||
#else
|
||||
CMD_UTILS_START_CONSOLE;
|
||||
|
|
|
@ -253,11 +253,9 @@ std::string incremented(const std::string &str, unsigned int toIncrement = 1);
|
|||
|
||||
void printDiagMessages(const TagParser::Diagnostics &diag, const char *head = nullptr, bool beVerbose = false);
|
||||
void printProperty(const char *propName, const char *value, const char *suffix = nullptr, CppUtilities::Indentation indentation = 4);
|
||||
void printProperty(
|
||||
const char *propName, ElementPosition elementPosition, const char *suffix = nullptr, CppUtilities::Indentation indentation = 4);
|
||||
void printProperty(const char *propName, ElementPosition elementPosition, const char *suffix = nullptr, CppUtilities::Indentation indentation = 4);
|
||||
|
||||
inline void printProperty(
|
||||
const char *propName, const std::string &value, const char *suffix = nullptr, CppUtilities::Indentation indentation = 4)
|
||||
inline void printProperty(const char *propName, const std::string &value, const char *suffix = nullptr, CppUtilities::Indentation indentation = 4)
|
||||
{
|
||||
printProperty(propName, value.data(), suffix, indentation);
|
||||
}
|
||||
|
@ -296,8 +294,7 @@ CppUtilities::TimeSpanOutputFormat parseTimeSpanOutputFormat(
|
|||
const CppUtilities::Argument &usageArg, CppUtilities::TimeSpanOutputFormat defaultFormat);
|
||||
TagUsage parseUsageDenotation(const CppUtilities::Argument &usageArg, TagUsage defaultUsage);
|
||||
TagTextEncoding parseEncodingDenotation(const CppUtilities::Argument &encodingArg, TagTextEncoding defaultEncoding);
|
||||
ElementPosition parsePositionDenotation(
|
||||
const CppUtilities::Argument &posArg, const CppUtilities::Argument &valueArg, ElementPosition defaultPos);
|
||||
ElementPosition parsePositionDenotation(const CppUtilities::Argument &posArg, const CppUtilities::Argument &valueArg, ElementPosition defaultPos);
|
||||
std::uint64_t parseUInt64(const CppUtilities::Argument &arg, std::uint64_t defaultValue);
|
||||
TagTarget::IdContainerType parseIds(const std::string &concatenatedIds);
|
||||
bool applyTargetConfiguration(TagTarget &target, const std::string &configStr);
|
||||
|
|
|
@ -108,7 +108,7 @@ TargetInfo::TargetInfo(const TagTarget &tagTarget, RAPIDJSON_NAMESPACE::Document
|
|||
, editions(tagTarget.editions())
|
||||
, attachments(tagTarget.attachments())
|
||||
{
|
||||
VAR_UNUSED(allocator)
|
||||
CPP_UTILITIES_UNUSED(allocator)
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
@ -28,12 +28,12 @@
|
|||
#endif
|
||||
|
||||
#include <c++utilities/application/commandlineutils.h>
|
||||
#include <c++utilities/misc/parseerror.h>
|
||||
#include <c++utilities/conversion/conversionexception.h>
|
||||
#include <c++utilities/conversion/stringbuilder.h>
|
||||
#include <c++utilities/conversion/stringconversion.h>
|
||||
#include <c++utilities/io/ansiescapecodes.h>
|
||||
#include <c++utilities/io/nativefilestream.h>
|
||||
#include <c++utilities/misc/parseerror.h>
|
||||
|
||||
#if defined(TAGEDITOR_GUI_QTWIDGETS) || defined(TAGEDITOR_GUI_QTQUICK)
|
||||
#include <QDir>
|
||||
|
@ -127,9 +127,9 @@ void generateFileInfo(const ArgumentOccurrence &, const Argument &inputFileArg,
|
|||
cerr << Phrases::Error << "An IO failure occured when reading the file \"" << inputFileArg.values().front() << "\"." << Phrases::EndFlush;
|
||||
}
|
||||
#else
|
||||
VAR_UNUSED(inputFileArg);
|
||||
VAR_UNUSED(outputFileArg);
|
||||
VAR_UNUSED(validateArg);
|
||||
CPP_UTILITIES_UNUSED(inputFileArg);
|
||||
CPP_UTILITIES_UNUSED(outputFileArg);
|
||||
CPP_UTILITIES_UNUSED(validateArg);
|
||||
cerr << Phrases::Error << "Generating HTML info is only available if built with Qt support." << Phrases::EndFlush;
|
||||
#endif
|
||||
}
|
||||
|
@ -969,8 +969,8 @@ void exportToJson(const ArgumentOccurrence &, const Argument &filesArg, const Ar
|
|||
cout << endl;
|
||||
|
||||
#else
|
||||
VAR_UNUSED(filesArg);
|
||||
VAR_UNUSED(prettyArg);
|
||||
CPP_UTILITIES_UNUSED(filesArg);
|
||||
CPP_UTILITIES_UNUSED(prettyArg);
|
||||
cerr << Phrases::Error << "JSON export has not been enabled when building the tag editor." << Phrases::EndFlush;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -49,18 +49,15 @@ extern const char *const fieldNames;
|
|||
extern const char *const fieldNamesForSet;
|
||||
void applyGeneralConfig(const CppUtilities::Argument &timeSapnFormatArg);
|
||||
void printFieldNames(const CppUtilities::ArgumentOccurrence &occurrence);
|
||||
void displayFileInfo(const CppUtilities::ArgumentOccurrence &, const CppUtilities::Argument &filesArg,
|
||||
const CppUtilities::Argument &verboseArg);
|
||||
void displayFileInfo(const CppUtilities::ArgumentOccurrence &, const CppUtilities::Argument &filesArg, const CppUtilities::Argument &verboseArg);
|
||||
void generateFileInfo(const CppUtilities::ArgumentOccurrence &, const CppUtilities::Argument &inputFileArg,
|
||||
const CppUtilities::Argument &outputFileArg, const CppUtilities::Argument &validateArg);
|
||||
void displayTagInfo(const CppUtilities::Argument &fieldsArg, const CppUtilities::Argument &showUnsupportedArg,
|
||||
const CppUtilities::Argument &filesArg, const CppUtilities::Argument &verboseArg);
|
||||
void setTagInfo(const Cli::SetTagInfoArgs &args);
|
||||
void extractField(const CppUtilities::Argument &fieldArg, const CppUtilities::Argument &attachmentArg,
|
||||
const CppUtilities::Argument &inputFilesArg, const CppUtilities::Argument &outputFileArg,
|
||||
void displayTagInfo(const CppUtilities::Argument &fieldsArg, const CppUtilities::Argument &showUnsupportedArg, const CppUtilities::Argument &filesArg,
|
||||
const CppUtilities::Argument &verboseArg);
|
||||
void exportToJson(const CppUtilities::ArgumentOccurrence &, const CppUtilities::Argument &filesArg,
|
||||
const CppUtilities::Argument &prettyArg);
|
||||
void setTagInfo(const Cli::SetTagInfoArgs &args);
|
||||
void extractField(const CppUtilities::Argument &fieldArg, const CppUtilities::Argument &attachmentArg, const CppUtilities::Argument &inputFilesArg,
|
||||
const CppUtilities::Argument &outputFileArg, const CppUtilities::Argument &verboseArg);
|
||||
void exportToJson(const CppUtilities::ArgumentOccurrence &, const CppUtilities::Argument &filesArg, const CppUtilities::Argument &prettyArg);
|
||||
|
||||
} // namespace Cli
|
||||
|
||||
|
|
|
@ -310,7 +310,7 @@ QNetworkReply *HttpResultsModel::evaluateReplyResults(QNetworkReply *reply, QByt
|
|||
if ((data = reply->readAll()).isEmpty()) {
|
||||
m_errorList << tr("Server replied no data.");
|
||||
}
|
||||
#ifdef DEBUG_BUILD
|
||||
#ifdef CPP_UTILITIES_DEBUG_BUILD
|
||||
cerr << "Results from HTTP query:" << endl;
|
||||
cerr << data.data() << endl;
|
||||
#endif
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <QAbstractTableModel>
|
||||
#include <QNetworkReply>
|
||||
|
||||
#ifdef DEBUG_BUILD
|
||||
#ifdef CPP_UTILITIES_DEBUG_BUILD
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
|
@ -136,7 +136,7 @@ protected:
|
|||
template <class Object, class Function> inline void HttpResultsModel::addReply(QNetworkReply *reply, Object object, Function handler)
|
||||
{
|
||||
(m_replies << reply), connect(reply, &QNetworkReply::finished, object, handler);
|
||||
#ifdef DEBUG_BUILD
|
||||
#ifdef CPP_UTILITIES_DEBUG_BUILD
|
||||
std::cerr << "HTTP query: " << reply->url().toString().toUtf8().data() << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ template <class Object, class Function> inline void HttpResultsModel::addReply(Q
|
|||
template <class Function> inline void HttpResultsModel::addReply(QNetworkReply *reply, Function handler)
|
||||
{
|
||||
(m_replies << reply), connect(reply, &QNetworkReply::finished, handler);
|
||||
#ifdef DEBUG_BUILD
|
||||
#ifdef CPP_UTILITIES_DEBUG_BUILD
|
||||
std::cerr << "HTTP query: " << reply->url().toString().toUtf8().data() << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ enum class TagType : unsigned int;
|
|||
namespace QtUtilities {
|
||||
class AboutDialog;
|
||||
class SettingsDialog;
|
||||
} // namespace Dialogs
|
||||
} // namespace QtUtilities
|
||||
|
||||
namespace QtGui {
|
||||
|
||||
|
|
|
@ -62,8 +62,8 @@ void PathLineEdit::contextMenuEvent(QContextMenuEvent *event)
|
|||
QFileInfo fileInfo(text());
|
||||
if (fileInfo.exists()) {
|
||||
if (fileInfo.isFile()) {
|
||||
connect(menu->addAction(QIcon::fromTheme(QStringLiteral("system-run")), tr("Open")), &QAction::triggered,
|
||||
bind(&openLocalFileOrDir, text()));
|
||||
connect(
|
||||
menu->addAction(QIcon::fromTheme(QStringLiteral("system-run")), tr("Open")), &QAction::triggered, bind(&openLocalFileOrDir, text()));
|
||||
} else if (fileInfo.isDir()) {
|
||||
connect(menu->addAction(QIcon::fromTheme(QStringLiteral("system-file-manager")), tr("Explore")), &QAction::triggered,
|
||||
bind(&openLocalFileOrDir, text()));
|
||||
|
|
|
@ -656,9 +656,8 @@ SettingsDialog::SettingsDialog(QWidget *parent)
|
|||
category->setDisplayName(tr("Editor"));
|
||||
category->setIcon(
|
||||
QIcon::fromTheme(QStringLiteral("document-edit"), QIcon(QStringLiteral(":/tageditor/icons/hicolor/32x32/settingscategories/key-enter.png"))));
|
||||
category->assignPages(QList<OptionPage *>()
|
||||
<< new EditorGeneralOptionPage << new EditorTempOptionPage(this) << new EditorFieldsOptionPage << new InfoOptionPage
|
||||
<< new EditorAutoCorrectionOptionPage << new EditorDbQueryOptionsPage);
|
||||
category->assignPages(QList<OptionPage *>() << new EditorGeneralOptionPage << new EditorTempOptionPage(this) << new EditorFieldsOptionPage
|
||||
<< new InfoOptionPage << new EditorAutoCorrectionOptionPage << new EditorDbQueryOptionsPage);
|
||||
categories << category;
|
||||
|
||||
category = new OptionCategory(this);
|
||||
|
|
|
@ -26,7 +26,7 @@ class ClearComboBox;
|
|||
class ClearSpinBox;
|
||||
class ClearPlainTextEdit;
|
||||
class IconButton;
|
||||
} // namespace Widgets
|
||||
} // namespace QtUtilities
|
||||
|
||||
namespace QtGui {
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ inline std::ostream &operator<<(std::ostream &os, const TagParser::DiagMessage &
|
|||
return os << diagMessage.levelName() << ':' << ' ' << diagMessage.message() << ' ' << '(' << diagMessage.context() << ')';
|
||||
}
|
||||
|
||||
} // namespace TestUtilities
|
||||
} // namespace CppUtilities
|
||||
|
||||
using namespace CppUtilities;
|
||||
|
||||
|
|
Loading…
Reference in New Issue