8000 Support for api_url by Mte90 · Pull Request #17 · Tatsh/kate-wakatime · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support for api_url #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jun 14, 2021
Merged

Support for api_url #17

merged 14 commits into from
Jun 14, 2021

Conversation

Mte90
Copy link
Contributor
@Mte90 Mte90 commented Jun 11, 2021

Added support for a new parameter api_url for other wakatime host replacements.

Copy link
Owner
@Tatsh Tatsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Could you rebase/squash th 8000 is into a single commit?

@Mte90
Copy link
Contributor Author
Mte90 commented Jun 14, 2021

This looks good. Could you rebase/squash this into a single commit?

I am trying to understand why I am getting a 401 if I use https://wakapi.dev/ and not with the official service.
Also I am not sure how to get debug info as I am not so skilled with C++ and Qt network APIs.

@Mte90

Copy link
Contributor Author
Mte90 commented Jun 14, 2021

So I updated the code also for Qt 5.15 to avoid some deprecation errors.
There is one that I don't know how to fix:

/home/mte90/Desktop/kde/kate-wakatime/wakatimeplugin.cpp: In member function ‘void WakaTimeView::sendQueuedHeartbeats()’:
/home/mte90/Desktop/kde/kate-wakatime/wakatimeplugin.cpp:384:32: warning: ‘QNetworkAccessManager::NetworkAccessibility QNetworkAccessManager::networkAccessible() const’ is deprecated [-Wdeprecated-declarations]
  384 |     if (nam->networkAccessible() != QNetworkAccessManager::Accessible) {
      |                                ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtNetwork/QNetworkAccessManager:1,
                 from /home/mte90/Desktop/kde/kate-wakatime/wakatimeplugin.cpp:46:
/usr/include/x86_64-linux-gnu/qt5/QtNetwork/qnetworkaccessmanager.h:160:53: note: declared here
  160 |     QT_DEPRECATED_VERSION_5_15 NetworkAccessibility networkAccessible() const;

About merge in a single commit you can do in Github the squash to a single commit when you press the green button on the arrow.

@Tatsh
Copy link
Owner
Tatsh commented Jun 14, 2021

Are you going to push more or do you want me to try this locally? I want to see about removing the changes in CMakeLists.txt and the deprecation issue with QNetworkAccess.

That part is just a warning. It seems Qt project does not want those functions to be used anymore. So I guess a replacement to check if we are offline needs to be put in. In particular, probably just want to check if apiUrlPath can be used at all. If it fails a pre-flight then assume we are offline. If you want to implement this, please do so.

@Mte90
Copy link
Contributor Author
Mte90 commented Jun 14, 2021

I finished working on that PR :-)

Mte90 and others added 2 commits June 14, 2021 15:55
Co-authored-by: Carl Schwan <carl@carlschwan.eu>
Co-authored-by: Carl Schwan <carl@carlschwan.eu>
@Tatsh Tatsh self-assigned this Jun 14, 2021
Tatsh added 2 commits June 14, 2021 19:35
Correct arguments to QProcess::start()
Format code
@Tatsh Tatsh merged commit 230b39e into Tatsh:master Jun 14, 2021
Tatsh added a commit to Tatsh/tatsh-overlay that referenced this pull request Jun 14, 2021
See Tatsh/kate-wakatime#17

Package-Manager: Portage-3.0.19, Repoman-3.0.3
@Mte90
Copy link
Contributor Author
Mte90 commented Jun 15, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0