Skip to content
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

PR: Add check_compatibility for PyQt4 and WebEngine #78

Merged
merged 4 commits into from
Jun 28, 2017

Conversation

dalthviz
Copy link
Member

Fixes #74

@dalthviz dalthviz added this to the v0.1 milestone Jun 27, 2017
@dalthviz dalthviz self-assigned this Jun 27, 2017
@dalthviz dalthviz requested a review from ccordoba12 June 27, 2017 20:46
@dalthviz dalthviz changed the title Adds check_compatibility for Qt/PyQt and WebEngine. PR: Add check_compatibility for Qt/PyQt and WebEngine Jun 27, 2017
message = ''
value = True
if PYQT4 or WEBENGINE:
message = _("You are working with Qt4 or WebEngine. <br><br>"
Copy link
Member

Choose a reason for hiding this comment

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

Instead of WebEngine, let's say here

... Qt4 or the PyQt5 wheels.

if PYQT4 or WEBENGINE:
message = _("You are working with Qt4 or WebEngine. <br><br>"
"In order to make the Notebook plugin work "
"you should update to Qt5 and use WebKit.")
Copy link
Member

Choose a reason for hiding this comment

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

Also this to

... to Qt5 and/or use Anaconda or Miniconda.

self.main.add_to_fileswitcher(self, self.tabwidget, self.clients,
QIcon(icon_path))
self.recent_notebook_menu.aboutToShow.connect(self.setup_menu_actions)
if self.check_compatibility()[0]:
Copy link
Member

@ccordoba12 ccordoba12 Jun 27, 2017

Choose a reason for hiding this comment

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

Is this really necessary? I thought the plugin won't be registered if check_compatibility is True.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, if not the plugin will be visible, although the message of incompatibility will be also displayed

Copy link
Member

Choose a reason for hiding this comment

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

This is an error in Spyder then. I'll open an issue so you can help me to fix it.

if PYQT4 or WEBENGINE:
message = _("You are working with Qt4 or the PyQt5 wheels."
"<br><br>In order to make the Notebook plugin "
"work you should update to Qt5 and/or use "
Copy link
Member

Choose a reason for hiding this comment

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

should -> need to

@ccordoba12 ccordoba12 changed the title PR: Add check_compatibility for Qt/PyQt and WebEngine PR: Add check_compatibility for PyQt4 and WebEngine Jun 28, 2017
@@ -12,6 +12,8 @@
import sys

# Qt imports
from qtpy import PYQT4
from qtpy.QtWebEngineWidgets import WEBENGINE
Copy link
Member

Choose a reason for hiding this comment

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

This import needs to be before the qtpy.QtWidgets one, so that they are organized alphabetically.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should I move the import for qtpy.QtCore and qtpy.compat too?

@ccordoba12
Copy link
Member

ccordoba12 commented Jun 28, 2017 via email

@ccordoba12 ccordoba12 merged commit 522ba89 into spyder-ide:master Jun 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants