Skip to content

Commit

Permalink
> Fixed few warnings
Browse files Browse the repository at this point in the history
- Remove copy file for macos patch paths
  • Loading branch information
trueromanus committed Sep 26, 2024
1 parent 00b0143 commit b5c7c9e
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ jobs:
- name: patch libraries paths
run: |
cp /usr/local/lib/libsharpyuv.0.dylib src/AniLibria.app/Contents/Frameworks/
cp /usr/local/Cellar/llvm/19.1.0/lib/c++/libc++abi.1.dylib src/AniLibria.app/Contents/Frameworks/
cp /usr/local/Cellar/llvm/19.1.0/lib/libunwind.1.dylib src/AniLibria.app/Contents/Frameworks/
cp /usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/Python src/AniLibria.app/Contents/Frameworks/
install_name_tool -change /usr/local/Cellar/ffmpeg/7.0_1/lib/libswresample.5.dylib @executable_path/../Frameworks/libswresample.5.dylib src/AniLibria.app/Contents/Frameworks/libavcodec.61.dylib
Expand Down
2 changes: 2 additions & 0 deletions src/Classes/ListModels/onlineplayervideolist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ void OnlinePlayerVideoList::setVideosFromSingleTorrent(const ReleaseTorrentModel

void OnlinePlayerVideoList::setVideosFromSingleList(int releaseId, const QString& poster) noexcept
{
Q_UNUSED(poster); //TODO: remake signature!!!

beginResetModel();

auto apiVideos = m_releaseViewModel->getReleaseVideos(releaseId);
Expand Down
36 changes: 36 additions & 0 deletions src/Classes/ViewModels/extensionsviewmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,18 @@ void ExtensionsViewModel::makeHttpGet(const QString &url, const QList<QString> h
m_pendingCallbacks.insert(identifier, callback);

QNetworkRequest request(url);

foreach (auto header, headers) {
auto parts = header.split(" ");
if (parts.size() == 2) {
auto name = parts.value(0);
auto value = parts.value(1);
request.setRawHeader(name.toUtf8(), value.toUtf8());
} else {
request.setRawHeader(header.toUtf8(), "");
}
}

request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
auto reply = m_networkManager->get(request);
reply->setProperty("pendingIndentifier", identifier);
Expand All @@ -354,6 +366,18 @@ void ExtensionsViewModel::makeHttpDelete(const QString &url, const QList<QString
m_pendingCallbacks.insert(identifier, callback);

QNetworkRequest request(url);

foreach (auto header, headers) {
auto parts = header.split(" ");
if (parts.size() == 2) {
auto name = parts.value(0);
auto value = parts.value(1);
request.setRawHeader(name.toUtf8(), value.toUtf8());
} else {
request.setRawHeader(header.toUtf8(), "");
}
}

request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
auto reply = m_networkManager->deleteResource(request);
reply->setProperty("pendingIndentifier", identifier);
Expand All @@ -371,6 +395,18 @@ void ExtensionsViewModel::makeHttpPost(const QString &url, const QList<QString>
m_pendingCallbacks.insert(identifier, callback);

QNetworkRequest request(url);

foreach (auto header, headers) {
auto parts = header.split(" ");
if (parts.size() == 2) {
auto name = parts.value(0);
auto value = parts.value(1);
request.setRawHeader(name.toUtf8(), value.toUtf8());
} else {
request.setRawHeader(header.toUtf8(), "");
}
}

request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
auto reply = m_networkManager->post(request, body.toUtf8());
reply->setProperty("pendingIndentifier", identifier);
Expand Down
1 change: 1 addition & 0 deletions src/Classes/ViewModels/torrentnotifierviewmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ void TorrentNotifierViewModel::socketDisconnected()

void TorrentNotifierViewModel::errorSocket(QAbstractSocket::SocketError error)
{
Q_UNUSED(error);
if (m_howMuchTimesTryConnect < 5) {
m_howMuchTimesTryConnect += 1;
QTimer::singleShot(1000 * m_howMuchTimesTryConnect, this, &TorrentNotifierViewModel::makeConnectToNotifiers);
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QS
QFile outFile("qt.log");
outFile.open(QIODevice::WriteOnly | QIODevice::Append);
QTextStream ts(&outFile);
ts << txt << endl;
ts << txt << Qt::endl;
}

int main(int argc, char *argv[])
Expand Down

0 comments on commit b5c7c9e

Please sign in to comment.