First pass for Qt6 compatibility

This commit is contained in:
Jeremy Rimpo
2022-04-19 15:17:23 +02:00
committed by Mikaël Capelle
parent ec01532ecb
commit c4b2be45d2
48 changed files with 268 additions and 239 deletions
+3
View File
@@ -5,6 +5,9 @@ set(project_type exe)
set(executable_name ModOrganizer)
set(enable_warnings OFF)
set(OPENSSL_USE_STATIC_LIBS FALSE CACHE STRING "" FORCE)
set(MySQL_INCLUDE_DIRS CACHE STRING "" FORCE)
# appveyor does not build modorganizer in its standard location, so use
# DEPENDENCIES_DIR to find cmake_common
if(DEFINED DEPENDENCIES_DIR)
+46 -46
View File
@@ -19,7 +19,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "bbcode.h"
#include <log.h>
#include <QRegExp>
#include <QRegularExpression>
#include <map>
namespace BBCode {
@@ -28,7 +28,7 @@ namespace log = MOBase::log;
class BBCodeMap {
typedef std::map<QString, std::pair<QRegExp, QString> > TagMap;
typedef std::map<QString, std::pair<QRegularExpression, QString> > TagMap;
public:
@@ -40,8 +40,8 @@ public:
QString convertTag(QString input, int &length)
{
// extract the tag name
m_TagNameExp.indexIn(input, 1, QRegExp::CaretAtOffset);
QString tagName = m_TagNameExp.cap(0).toLower();
auto match = m_TagNameExp.match(input, 1, QRegularExpression::NormalMatch, QRegularExpression::AnchoredMatchOption);
QString tagName = match.captured(0).toLower();
TagMap::iterator tagIter = m_TagMap.find(tagName);
if (tagIter != m_TagMap.end()) {
// recognized tag
@@ -53,7 +53,7 @@ public:
int closeTagLength = 0;
if (tagName == "*") {
// ends at the next bullet point
closeTagPos = input.indexOf(QRegExp("(\\[\\*\\]|</ul>)", Qt::CaseInsensitive), 3);
closeTagPos = input.indexOf(QRegularExpression("(\\[\\*\\]|</ul>)", QRegularExpression::CaseInsensitiveOption), 3);
// leave closeTagLength at 0 because we don't want to "eat" the next bullet point
} else if (tagName == "line") {
// ends immediately after the tag
@@ -73,11 +73,12 @@ public:
if (closeTagPos > -1) {
length = closeTagPos + closeTagLength;
QString temp = input.mid(0, length);
if (tagIter->second.first.indexIn(temp) == 0) {
auto match = tagIter->second.first.match(temp);
if (match.hasMatch()) {
if (tagIter->second.second.isEmpty()) {
if (tagName == "color") {
QString color = tagIter->second.first.cap(1);
QString content = tagIter->second.first.cap(2);
QString color = match.captured(1);
QString content = match.captured(2);
if (color.at(0) == '#') {
return temp.replace(tagIter->second.first, QString("<font style=\"color: %1;\">%2</font>").arg(color, content));
} else {
@@ -92,7 +93,7 @@ public:
}
} else {
if (tagName == "*") {
temp.remove(QRegExp("(\\[/\\*\\])?(<br/>)?$"));
temp.remove(QRegularExpression("(\\[/\\*\\])?(<br/>)?$"));
}
return temp.replace(tagIter->second.first, tagIter->second.second);
}
@@ -115,84 +116,83 @@ private:
BBCodeMap()
: m_TagNameExp("^[a-zA-Z*]*=?")
{
m_TagMap["b"] = std::make_pair(QRegExp("\\[b\\](.*)\\[/b\\]"),
m_TagMap["b"] = std::make_pair(QRegularExpression("\\[b\\](.*)\\[/b\\]"),
"<b>\\1</b>");
m_TagMap["i"] = std::make_pair(QRegExp("\\[i\\](.*)\\[/i\\]"),
m_TagMap["i"] = std::make_pair(QRegularExpression("\\[i\\](.*)\\[/i\\]"),
"<i>\\1</i>");
m_TagMap["u"] = std::make_pair(QRegExp("\\[u\\](.*)\\[/u\\]"),
m_TagMap["u"] = std::make_pair(QRegularExpression("\\[u\\](.*)\\[/u\\]"),
"<u>\\1</u>");
m_TagMap["s"] = std::make_pair(QRegExp("\\[s\\](.*)\\[/s\\]"),
m_TagMap["s"] = std::make_pair(QRegularExpression("\\[s\\](.*)\\[/s\\]"),
"<s>\\1</s>");
m_TagMap["sub"] = std::make_pair(QRegExp("\\[sub\\](.*)\\[/sub\\]"),
m_TagMap["sub"] = std::make_pair(QRegularExpression("\\[sub\\](.*)\\[/sub\\]"),
"<sub>\\1</sub>");
m_TagMap["sup"] = std::make_pair(QRegExp("\\[sup\\](.*)\\[/sup\\]"),
m_TagMap["sup"] = std::make_pair(QRegularExpression("\\[sup\\](.*)\\[/sup\\]"),
"<sup>\\1</sup>");
m_TagMap["size="] = std::make_pair(QRegExp("\\[size=([^\\]]*)\\](.*)\\[/size\\]"),
m_TagMap["size="] = std::make_pair(QRegularExpression("\\[size=([^\\]]*)\\](.*)\\[/size\\]"),
"<font size=\"\\1\">\\2</font>");
m_TagMap["color="] = std::make_pair(QRegExp("\\[color=([^\\]]*)\\](.*)\\[/color\\]"),
m_TagMap["color="] = std::make_pair(QRegularExpression("\\[color=([^\\]]*)\\](.*)\\[/color\\]"),
"");
m_TagMap["font="] = std::make_pair(QRegExp("\\[font=([^\\]]*)\\](.*)\\[/font\\]"),
m_TagMap["font="] = std::make_pair(QRegularExpression("\\[font=([^\\]]*)\\](.*)\\[/font\\]"),
"<font style=\"font-family: \\1;\">\\2</font>");
m_TagMap["center"] = std::make_pair(QRegExp("\\[center\\](.*)\\[/center\\]"),
m_TagMap["center"] = std::make_pair(QRegularExpression("\\[center\\](.*)\\[/center\\]"),
"<div align=\"center\">\\1</div>");
m_TagMap["quote"] = std::make_pair(QRegExp("\\[quote\\](.*)\\[/quote\\]"),
m_TagMap["quote"] = std::make_pair(QRegularExpression("\\[quote\\](.*)\\[/quote\\]"),
"<figure class=\"quote\"><blockquote>\\1</blockquote></figure>");
m_TagMap["quote="] = std::make_pair(QRegExp("\\[quote=([^\\]]*)\\](.*)\\[/quote\\]"),
m_TagMap["quote="] = std::make_pair(QRegularExpression("\\[quote=([^\\]]*)\\](.*)\\[/quote\\]"),
"<figure class=\"quote\"><blockquote>\\2</blockquote></figure>");
m_TagMap["spoiler"] = std::make_pair(QRegExp("\\[spoiler\\](.*)\\[/spoiler\\]"),
m_TagMap["spoiler"] = std::make_pair(QRegularExpression("\\[spoiler\\](.*)\\[/spoiler\\]"),
"<details><summary>Spoiler: <div class=\"bbc_spoiler_show\">Show</div></summary><div class=\"spoiler_content\">\\1</div></details>");
m_TagMap["code"] = std::make_pair(QRegExp("\\[code\\](.*)\\[/code\\]"),
m_TagMap["code"] = std::make_pair(QRegularExpression("\\[code\\](.*)\\[/code\\]"),
"<code>\\1</code>");
m_TagMap["heading"]= std::make_pair(QRegExp("\\[heading\\](.*)\\[/heading\\]"),
m_TagMap["heading"]= std::make_pair(QRegularExpression("\\[heading\\](.*)\\[/heading\\]"),
"<h2><strong>\\1</strong></h2>");
m_TagMap["line"] = std::make_pair(QRegExp("\\[line\\]"),
m_TagMap["line"] = std::make_pair(QRegularExpression("\\[line\\]"),
"<hr>");
// lists
m_TagMap["list"] = std::make_pair(QRegExp("\\[list\\](.*)\\[/list\\]"),
m_TagMap["list"] = std::make_pair(QRegularExpression("\\[list\\](.*)\\[/list\\]"),
"<ul>\\1</ul>");
m_TagMap["list="] = std::make_pair(QRegExp("\\[list.*\\](.*)\\[/list\\]"),
m_TagMap["list="] = std::make_pair(QRegularExpression("\\[list.*\\](.*)\\[/list\\]"),
"<ol>\\1</ol>");
m_TagMap["ul"] = std::make_pair(QRegExp("\\[ul\\](.*)\\[/ul\\]"),
m_TagMap["ul"] = std::make_pair(QRegularExpression("\\[ul\\](.*)\\[/ul\\]"),
"<ul>\\1</ul>");
m_TagMap["ol"] = std::make_pair(QRegExp("\\[ol\\](.*)\\[/ol\\]"),
m_TagMap["ol"] = std::make_pair(QRegularExpression("\\[ol\\](.*)\\[/ol\\]"),
"<ol>\\1</ol>");
m_TagMap["li"] = std::make_pair(QRegExp("\\[li\\](.*)\\[/li\\]"),
m_TagMap["li"] = std::make_pair(QRegularExpression("\\[li\\](.*)\\[/li\\]"),
"<li>\\1</li>");
// tables
m_TagMap["table"] = std::make_pair(QRegExp("\\[table\\](.*)\\[/table\\]"),
m_TagMap["table"] = std::make_pair(QRegularExpression("\\[table\\](.*)\\[/table\\]"),
"<table>\\1</table>");
m_TagMap["tr"] = std::make_pair(QRegExp("\\[tr\\](.*)\\[/tr\\]"),
m_TagMap["tr"] = std::make_pair(QRegularExpression("\\[tr\\](.*)\\[/tr\\]"),
"<tr>\\1</tr>");
m_TagMap["th"] = std::make_pair(QRegExp("\\[th\\](.*)\\[/th\\]"),
m_TagMap["th"] = std::make_pair(QRegularExpression("\\[th\\](.*)\\[/th\\]"),
"<th>\\1</th>");
m_TagMap["td"] = std::make_pair(QRegExp("\\[td\\](.*)\\[/td\\]"),
m_TagMap["td"] = std::make_pair(QRegularExpression("\\[td\\](.*)\\[/td\\]"),
"<td>\\1</td>");
// web content
m_TagMap["url"] = std::make_pair(QRegExp("\\[url\\](.*)\\[/url\\]"),
m_TagMap["url"] = std::make_pair(QRegularExpression("\\[url\\](.*)\\[/url\\]"),
"<a href=\"\\1\">\\1</a>");
m_TagMap["url="] = std::make_pair(QRegExp("\\[url=([^\\]]*)\\](.*)\\[/url\\]"),
m_TagMap["url="] = std::make_pair(QRegularExpression("\\[url=([^\\]]*)\\](.*)\\[/url\\]"),
"<a href=\"\\1\">\\2</a>");
m_TagMap["img"] = std::make_pair(QRegExp("\\[img(?:\\s*width=\\d+\\s*,?\\s*height=\\d+)?\\](.*)\\[/img\\]"),
m_TagMap["img"] = std::make_pair(QRegularExpression("\\[img(?:\\s*width=\\d+\\s*,?\\s*height=\\d+)?\\](.*)\\[/img\\]"),
"<img src=\"\\1\">");
m_TagMap["img="] = std::make_pair(QRegExp("\\[img=([^\\]]*)\\](.*)\\[/img\\]"),
m_TagMap["img="] = std::make_pair(QRegularExpression("\\[img=([^\\]]*)\\](.*)\\[/img\\]"),
"<img src=\"\\2\" alt=\"\\1\">");
m_TagMap["email="] = std::make_pair(QRegExp("\\[email=\"?([^\\]]*)\"?\\](.*)\\[/email\\]"),
m_TagMap["email="] = std::make_pair(QRegularExpression("\\[email=\"?([^\\]]*)\"?\\](.*)\\[/email\\]"),
"<a href=\"mailto:\\1\">\\2</a>");
m_TagMap["youtube"] = std::make_pair(QRegExp("\\[youtube\\](.*)\\[/youtube\\]"),
m_TagMap["youtube"] = std::make_pair(QRegularExpression("\\[youtube\\](.*)\\[/youtube\\]"),
"<a href=\"https://www.youtube.com/watch?v=\\1\">https://www.youtube.com/watch?v=\\1</a>");
// make all patterns non-greedy and case-insensitive
for (TagMap::iterator iter = m_TagMap.begin(); iter != m_TagMap.end(); ++iter) {
iter->second.first.setCaseSensitivity(Qt::CaseInsensitive);
iter->second.first.setMinimal(true);
iter->second.first.setPatternOptions(QRegularExpression::CaseInsensitiveOption | QRegularExpression::InvertedGreedinessOption);
}
// this tag is in fact greedy
m_TagMap["*"] = std::make_pair(QRegExp("\\[\\*\\](.*)"),
m_TagMap["*"] = std::make_pair(QRegularExpression("\\[\\*\\](.*)"),
"<li>\\1</li>");
m_ColorMap.insert(std::make_pair<QString, QString>("red", "FF0000"));
@@ -216,7 +216,7 @@ private:
private:
QRegExp m_TagNameExp;
QRegularExpression m_TagNameExp;
TagMap m_TagMap;
std::map<QString, QString> m_ColorMap;
};
@@ -241,7 +241,7 @@ QString convertToHTML(const QString &inputParam)
// iterate over the input buffer
while ((pos = input.indexOf('[', lastBlock)) != -1) {
// append everything between the previous tag-block and the current one
result.append(input.midRef(lastBlock, pos - lastBlock));
result.append(input.mid(lastBlock, pos - lastBlock));
if ((pos < (input.size() - 1)) && (input.at(pos + 1) == '/')) {
// skip invalid end tag
@@ -272,7 +272,7 @@ QString convertToHTML(const QString &inputParam)
}
// append the remainder (everything after the last tag)
result.append(input.midRef(lastBlock));
result.append(input.mid(lastBlock));
return result;
}
+11 -9
View File
@@ -174,16 +174,18 @@ void BrowserDialog::titleChanged(const QString &title)
QString BrowserDialog::guessFileName(const QString &url)
{
QRegExp uploadsExp(QString("https://.+/uploads/([^/]+)$"));
if (uploadsExp.indexIn(url) != -1) {
QRegularExpression uploadsExp(QString("https://.+/uploads/([^/]+)$"));
auto match = uploadsExp.match(url);
if (match.hasMatch()) {
// these seem to be premium downloads
return uploadsExp.cap(1);
return match.captured(1);
}
QRegExp filesExp(QString("https://.+\\?file=([^&]+)"));
if (filesExp.indexIn(url) != -1) {
QRegularExpression filesExp(QString("https://.+\\?file=([^&]+)"));
match = filesExp.match(url);
if (match.hasMatch()) {
// a regular manual download?
return filesExp.cap(1);
return match.captured(1);
}
return "unknown";
}
@@ -196,13 +198,13 @@ void BrowserDialog::unsupportedContent(QNetworkReply *reply)
log::error("sender not a page");
return;
}
BrowserView *view = qobject_cast<BrowserView*>(page->view());
/*browserview *view = qobject_cast<browserview*>(page->view());
if (view == nullptr) {
log::error("no view?");
return;
}
}*/
emit requestDownload(view->url(), reply);
emit requestDownload(page->url(), reply);
} catch (const std::exception &e) {
if (isVisible()) {
MessageDialog::showMessage(tr("failed to start download"), this);
+2 -2
View File
@@ -22,7 +22,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <QEvent>
#include <QKeyEvent>
#include <QNetworkDiskCache>
#include <QWebEngineContextMenuData>
#include <QWebEngineContextMenuRequest>
#include <QWebEngineSettings>
#include <QMenu>
#include <Shlwapi.h>
@@ -55,7 +55,7 @@ bool BrowserView::eventFilter(QObject *obj, QEvent *event)
}
} else if (event->type() == QEvent::MouseButtonPress) {
QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
if (mouseEvent->button() == Qt::MidButton) {
if (mouseEvent->button() == Qt::MouseButton::MiddleButton) {
mouseEvent->ignore();
return true;
}
+1 -1
View File
@@ -160,7 +160,7 @@ void CategoryFactory::saveCategories()
QByteArray line;
line.append(QByteArray::number(iter->m_ID)).append("|")
.append(iter->m_Name.toUtf8()).append("|")
.append(VectorJoin(iter->m_NexusIDs, ",")).append("|")
.append(VectorJoin(iter->m_NexusIDs, ",").toUtf8()).append("|")
.append(QByteArray::number(iter->m_ParentID)).append("\n");
categoryFile.write(line);
}
+3 -3
View File
@@ -23,7 +23,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "utility.h"
#include "settings.h"
#include <QItemDelegate>
#include <QRegExpValidator>
#include <QRegularExpressionValidator>
#include <QLineEdit>
#include <QMenu>
@@ -134,7 +134,7 @@ void CategoriesDialog::commitChanges()
for (int i = 0; i < ui->categoriesTable->rowCount(); ++i) {
int index = ui->categoriesTable->verticalHeader()->logicalIndex(i);
QString nexusIDString = ui->categoriesTable->item(index, 2)->text();
QStringList nexusIDStringList = nexusIDString.split(',', QString::SkipEmptyParts);
QStringList nexusIDStringList = nexusIDString.split(',', Qt::SkipEmptyParts);
std::vector<int> nexusIDs;
for (QStringList::iterator iter = nexusIDStringList.begin();
iter != nexusIDStringList.end(); ++iter) {
@@ -189,7 +189,7 @@ void CategoriesDialog::fillTable()
table->setItemDelegateForColumn(0, new ValidatingDelegate(this, new NewIDValidator(m_IDs)));
table->setItemDelegateForColumn(2, new ValidatingDelegate(this, new QRegExpValidator(QRegExp("([0-9]+)?(,[0-9]+)*"), this)));
table->setItemDelegateForColumn(2, new ValidatingDelegate(this, new QRegularExpressionValidator(QRegularExpression("([0-9]+)?(,[0-9]+)*"), this)));
table->setItemDelegateForColumn(3, new ValidatingDelegate(this, new ExistingIDValidator(m_IDs)));
int row = 0;
+1 -1
View File
@@ -4,7 +4,7 @@
CSVBuilder::CSVBuilder(QIODevice *target)
: m_Out(target), m_Separator(','), m_LineBreak(BREAK_CRLF)
{
m_Out.setCodec("UTF-8");
m_Out.setEncoding(QStringConverter::Encoding::Utf8);
m_QuoteMode[TYPE_INTEGER] = QUOTE_NEVER;
m_QuoteMode[TYPE_FLOAT] = QUOTE_NEVER;
+5 -9
View File
@@ -34,8 +34,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
**/
class DirectoryRefresher : public QObject
{
Q_OBJECT
Q_OBJECT;
public:
struct EntryInfo
@@ -54,11 +53,8 @@ public:
int priority;
};
DirectoryRefresher(std::size_t threadCount);
// noncopyable
DirectoryRefresher(const DirectoryRefresher&) = delete;
DirectoryRefresher& operator=(const DirectoryRefresher&) = delete;
DirectoryRefresher(std::size_t threadCount);
/**
* @brief retrieve the updated directory structure
@@ -82,7 +78,7 @@ public:
* @param modDirectory the mod directory
* @note this function could be obsoleted easily by storing absolute paths in the parameter to setMods. This is legacy
*/
void setModDirectory(const QString &modDirectory);
//void setModDirectory(const QString &modDirectory);
/**
* @brief remove files from the directory structure that are known to be irrelevant to the game
@@ -157,9 +153,9 @@ private:
};
class DirectoryRefreshProgress : QObject
class DirectoryRefreshProgress : public QObject
{
Q_OBJECT;
Q_OBJECT
public:
DirectoryRefreshProgress(DirectoryRefresher* r) :
+42 -25
View File
@@ -1,29 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="dlls" version="1.0.0.0" processorArchitecture="x86"/>
<file name="icuin54.dll"/>
<file name="icuuc54.dll"/>
<file name="icudt54.dll"/>
<file name="Qt5Cored.dll"/>
<file name="Qt5Declaratived.dll"/>
<file name="Qt5Guid.dll"/>
<file name="Qt5Multimediad.dll"/>
<file name="Qt5MultimediaWidgetsd.dll"/>
<file name="Qt5Networkd.dll"/>
<file name="Qt5OpenGLd.dll"/>
<file name="Qt5Positioningd.dll"/>
<file name="Qt5PrintSupportd.dll"/>
<file name="Qt5Qmld.dll"/>
<file name="Qt5Quickd.dll"/>
<file name="Qt5Sensorsd.dll"/>
<file name="Qt5Scriptd.dll"/>
<file name="Qt5Sqld.dll"/>
<file name="Qt5Svgd.dll"/>
<file name="Qt5WebChanneld.dll"/>
<file name="Qt5WebKitd.dll"/>
<file name="Qt5WebKitWidgetsd.dll"/>
<file name="Qt5Widgetsd.dll"/>
<file name="Qt5WinExtrasd.dll"/>
<file name="Qt5Xmld.dll"/>
<file name="Qt5XmlPatternsd.dll"/>
<file name="7z.dll"/>
<file name="archive.dll"/>
<file name="d3dcompiler_47.dll"/>
<file name="libbsarch.dll"/>
<file name="libcrypto-1_1-x64.dll"/>
<file name="libEGL.dll"/>
<file name="libGLESV2.dll"/>
<file name="liblz4.dll"/>
<file name="libssl-1_1-x64.dll"/>
<file name="opengl32sw.dll"/>
<file name="Qt6Concurrent.dll"/>
<file name="Qt6Core.dll"/>
<file name="Qt6Core5Compat.dll"/>
<file name="Qt6Gui.dll"/>
<file name="Qt6Network.dll"/>
<file name="Qt6OpenGL.dll"/>
<file name="Qt6OpenGLWidgets.dll"/>
<file name="Qt6Positioning.dll"/>
<file name="Qt6PrintSupport.dll"/>
<file name="Qt6Qml.dll"/>
<file name="Qt6QmlLocalStorage.dll"/>
<file name="Qt6QmlModels.dll"/>
<file name="Qt6QmlWorkerScript.dll"/>
<file name="Qt6QmlXmlListModel.dll"/>
<file name="Qt6Quick.dll"/>
<file name="Qt6QuickControls2.dll"/>
<file name="Qt6QuickControls2Impl.dll"/>
<file name="Qt6QuickDialogs2.dll"/>
<file name="Qt6QuickDialogs2QuickImpl.dll"/>
<file name="Qt6QuickDialogs2Utils.dll"/>
<file name="Qt6QuickLayouts.dll"/>
<file name="Qt6QuickParticles.dll"/>
<file name="Qt6QuickShapes.dll"/>
<file name="Qt6QuickTemplates2.dll"/>
<file name="Qt6QuickWidgets.dll"/>
<file name="Qt6Sql.dll"/>
<file name="Qt6Svg.dll"/>
<file name="Qt6WebChannel.dll"/>
<file name="Qt6WebEngineCore.dll"/>
<file name="Qt6WebEngineWidgets.dll"/>
<file name="Qt6WebSockets.dll"/>
<file name="Qt6Widgets.dll"/>
</assembly>
+35 -18
View File
@@ -4,26 +4,43 @@
<file name="7z.dll"/>
<file name="archive.dll"/>
<file name="d3dcompiler_47.dll"/>
<file name="libbsarch.dll"/>
<file name="libcrypto-1_1-x64.dll"/>
<file name="libEGL.dll"/>
<file name="libGLESV2.dll"/>
<file name="liblz4.dll"/>
<file name="libssl-1_1-x64.dll"/>
<file name="opengl32sw.dll"/>
<file name="Qt5Core.dll"/>
<file name="Qt5Gui.dll"/>
<file name="Qt5Network.dll"/>
<file name="Qt5Positioning.dll"/>
<file name="Qt5PrintSupport.dll"/>
<file name="Qt5Qml.dll"/>
<file name="Qt5QmlModels.dll"/>
<file name="Qt5QmlWorkerScript.dll"/>
<file name="Qt5Quick.dll"/>
<file name="Qt5QuickWidgets.dll"/>
<file name="Qt5SerialPort.dll"/>
<file name="Qt5Svg.dll"/>
<file name="Qt5WebChannel.dll"/>
<file name="Qt5WebEngineCore.dll"/>
<file name="Qt5WebEngineWidgets.dll"/>
<file name="Qt5WebSockets.dll"/>
<file name="Qt5Widgets.dll"/>
<file name="Qt5WinExtras.dll"/>
<file name="Qt6Concurrent.dll"/>
<file name="Qt6Core.dll"/>
<file name="Qt6Core5Compat.dll"/>
<file name="Qt6Gui.dll"/>
<file name="Qt6Network.dll"/>
<file name="Qt6OpenGL.dll"/>
<file name="Qt6OpenGLWidgets.dll"/>
<file name="Qt6Positioning.dll"/>
<file name="Qt6PrintSupport.dll"/>
<file name="Qt6Qml.dll"/>
<file name="Qt6QmlLocalStorage.dll"/>
<file name="Qt6QmlModels.dll"/>
<file name="Qt6QmlWorkerScript.dll"/>
<file name="Qt6QmlXmlListModel.dll"/>
<file name="Qt6Quick.dll"/>
<file name="Qt6QuickControls2.dll"/>
<file name="Qt6QuickControls2Impl.dll"/>
<file name="Qt6QuickDialogs2.dll"/>
<file name="Qt6QuickDialogs2QuickImpl.dll"/>
<file name="Qt6QuickDialogs2Utils.dll"/>
<file name="Qt6QuickLayouts.dll"/>
<file name="Qt6QuickParticles.dll"/>
<file name="Qt6QuickShapes.dll"/>
<file name="Qt6QuickTemplates2.dll"/>
<file name="Qt6QuickWidgets.dll"/>
<file name="Qt6Sql.dll"/>
<file name="Qt6Svg.dll"/>
<file name="Qt6WebChannel.dll"/>
<file name="Qt6WebEngineCore.dll"/>
<file name="Qt6WebEngineWidgets.dll"/>
<file name="Qt6WebSockets.dll"/>
<file name="Qt6Widgets.dll"/>
</assembly>
+1 -1
View File
@@ -482,7 +482,7 @@ void EditExecutablesDialog::save()
e->title(newTitle);
}
e->binaryInfo(ui->binary->text());
e->binaryInfo(QFileInfo(ui->binary->text()));
e->workingDirectory(ui->workingDirectory->text());
e->arguments(ui->arguments->text());
+3 -3
View File
@@ -801,7 +801,7 @@ std::pair<QString, QString> splitExeAndArguments(const QString& cmd)
}
} else {
// no double-quotes, find the first whitespace
exeEnd = cmd.indexOf(QRegExp("\\s"));
exeEnd = cmd.indexOf(QRegularExpression("\\s"));
if (exeEnd == -1) {
exeEnd = cmd.size();
}
@@ -844,7 +844,7 @@ Association getAssociation(const QFileInfo& targetInfo)
log::debug("split into exe='{}' and cmd='{}'", p.first, p.second);
return {p.first, *cmd, p.second};
return {QFileInfo(p.first), *cmd, p.second};
}
@@ -1108,7 +1108,7 @@ DWORD findOtherPid()
// going through processes, trying to find one with the same name and a
// different pid than this process has
for (const auto& p : processes) {
if (p.name() == filename) {
if (p.name().toStdWString() == filename) {
if (p.pid() != thisPid) {
return p.pid();
}
+1 -1
View File
@@ -4,7 +4,7 @@
#include <shellscalingapi.h>
#include <log.h>
#include <utility.h>
#include <QDesktopWidget>
#include <QScreen>
namespace env
{
+4 -4
View File
@@ -70,9 +70,9 @@ public:
{
}
bool nativeEventFilter(const QByteArray& type, void* m, long* lresultOut) override
bool nativeEventFilter(const QByteArray& eventType, void* message, qintptr* result) override
{
MSG* msg = (MSG*)m;
MSG* msg = (MSG*)message;
if (!msg) {
return false;
}
@@ -81,8 +81,8 @@ public:
const bool r = m_f(msg->hwnd, msg->message, msg->wParam, msg->lParam, &lr);
if (lresultOut) {
*lresultOut = lr;
if (result) {
*result = lr;
}
return r;
+1 -1
View File
@@ -94,7 +94,7 @@ void ExecutablesList::load(const MOBase::IPluginGame* game, const Settings& s)
setExecutable(Executable()
.title(map["title"].toString())
.binaryInfo(map["binary"].toString())
.binaryInfo(QFileInfo(map["binary"].toString()))
.arguments(map["arguments"].toString())
.steamAppID(map["steamAppID"].toString())
.workingDirectory(map["workingDirectory"].toString())
+1 -1
View File
@@ -38,7 +38,7 @@ public:
static QString getOpenFileName(
const QString &dirID, QWidget *parent = 0, const QString &caption = QString(),
const QString &dir = QString(), const QString &filter = QString(),
QString *selectedFilter = 0, QFileDialog::Options options = 0);
QString *selectedFilter = 0, QFileDialog::Options options = QFileDialog::Option(0));
static QString getExistingDirectory(
const QString &dirID, QWidget *parent = 0, const QString &caption = QString(),
+2 -2
View File
@@ -38,7 +38,7 @@ FileRenamer::RenameResults FileRenamer::rename(const QString& oldName, const QSt
log::debug("removing {}", newName);
// user wants to replace the file, so remove it
const auto r = shell::Delete(newName);
const auto r = shell::Delete(QFileInfo(newName));
if (!r.success()) {
log::error("failed to remove '{}': {}", newName, r.toString());
@@ -68,7 +68,7 @@ FileRenamer::RenameResults FileRenamer::rename(const QString& oldName, const QSt
}
// target either didn't exist or was removed correctly
const auto r = shell::Rename(oldName, newName);
const auto r = shell::Rename(QFileInfo(oldName), QFileInfo(newName));
if (!r.success()) {
log::error(
+2 -2
View File
@@ -568,7 +568,7 @@ bool FileTree::showShellMenu(QPoint pos)
.arg(item->realPath()));
}
itor->second.addFile(item->realPath());
itor->second.addFile(QFileInfo(item->realPath()));
++totalFiles;
if (item->isConflicted()) {
@@ -611,7 +611,7 @@ bool FileTree::showShellMenu(QPoint pos)
.arg(QString::fromStdWString(fullPath)));
}
itor->second.addFile(QString::fromStdWString(fullPath));
itor->second.addFile(QFileInfo(QString::fromStdWString(fullPath)));
}
}
}
+2 -2
View File
@@ -1100,8 +1100,8 @@ QVariant FileTreeModel::displayData(const FileTreeItem* item, int column) const
case LastModified:
{
if (auto d=item->lastModified()) {
if (d->isValid()) {
return d->toString(Qt::SystemLocaleDate);
if (d.has_value() && d.value().isValid()) {
return QLocale::system().toString(d.value(), QLocale::ShortFormat);
}
}
+2 -2
View File
@@ -114,8 +114,8 @@ namespace MOShared {
while (str_it != str_end)
{
CharT current_pat = 0;
CharT current_str = -1;
CharT current_pat = QChar(0);
CharT current_str = QChar(-1);
if (pat_it != pat_end)
{
current_pat = case_sensitive ? *pat_it : traits::tolower(*pat_it);

Some files were not shown because too many files have changed in this diff Show More