Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
skylivex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
astronomy
skylivex
Commits
e5e406c3
Commit
e5e406c3
authored
Mar 05, 2013
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fucking osx
parent
4b8371d0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
mainwin.cpp
src/mainwin.cpp
+11
-4
mainwin.h
src/mainwin.h
+3
-0
No files found.
src/mainwin.cpp
View file @
e5e406c3
...
@@ -118,17 +118,20 @@ void MainWin::httpResponseFinished(QNetworkReply * reply)
...
@@ -118,17 +118,20 @@ void MainWin::httpResponseFinished(QNetworkReply * reply)
{
{
QString
urls
=
reply
->
url
().
toString
();
QString
urls
=
reply
->
url
().
toString
();
//std::cout << "AAAA " << reply->error() << " URI " << urls.toStdString() << std::endl;;
//std::cout << "AAAA " << reply->error() << " URI " << urls.toStdString() << std::endl;;
#if defined(Q_OS_MAC)
if
(
yt_is_open
&&
urls
.
contains
(
"stream_204"
)
&&
urls
.
contains
(
"youtube"
)
&&
urls
.
contains
(
"html5=1"
)
&&
yt_is_fallback
==
false
)
#else
if
(
yt_is_open
&&
urls
.
contains
(
"stream_204"
)
&&
urls
.
contains
(
"youtube"
)
&&
urls
.
contains
(
"html5=1"
))
if
(
yt_is_open
&&
urls
.
contains
(
"stream_204"
)
&&
urls
.
contains
(
"youtube"
)
&&
urls
.
contains
(
"html5=1"
))
#endif
{
{
QString
urlstr
=
yt
->
url
().
toString
();
QString
urlstr
=
yt
->
url
().
toString
();
std
::
cout
<<
"NO HTML5 FOR THIS YOUTUBE VIDEO "
<<
urlstr
.
toStdString
()
<<
std
::
endl
;
std
::
cout
<<
"NO HTML5 FOR THIS YOUTUBE VIDEO "
<<
urlstr
.
toStdString
()
<<
std
::
endl
;
std
::
cout
<<
"Reopen with "
<<
urlstr
.
remove
(
"html5=1&"
).
toStdString
()
<<
std
::
endl
;
std
::
cout
<<
"Reopen with "
<<
urlstr
.
remove
(
"html5=1&"
).
toStdString
()
<<
std
::
endl
;
yt
->
stop
();
yt
->
stop
();
// connect(nam, SIGNAL(finished(QNetworkReply *)), this, SLOT(httpResponseFinished(QNetworkReply *)));
//disconnect(yt->page()->networkAccessManager(), &ReferredNetworkAccessManager::finished, this, &MainWin::httpResponseFinished);
disconnect
(
yt
->
page
()
->
networkAccessManager
(),
SIGNAL
(
finished
(
QNetworkReply
*
)),
this
,
SLOT
(
httpResponseFinished
(
QNetworkReply
*
)));
disconnect
(
yt
->
page
()
->
networkAccessManager
(),
SIGNAL
(
finished
(
QNetworkReply
*
)),
this
,
SLOT
(
httpResponseFinished
(
QNetworkReply
*
)));
#if defined(Q_OS_MAC)
yt_is_fallback
=
true
;
#endif
yt
->
load
(
QUrl
(
urlstr
.
remove
(
"html5=1&"
)));
yt
->
load
(
QUrl
(
urlstr
.
remove
(
"html5=1&"
)));
}
}
}
}
...
@@ -221,6 +224,10 @@ void MainWin::handle_youtubevideo(SKMessage &msg)
...
@@ -221,6 +224,10 @@ void MainWin::handle_youtubevideo(SKMessage &msg)
newWeb
->
setNetworkAccessManager
(
nam
);
newWeb
->
setNetworkAccessManager
(
nam
);
//#endif
//#endif
#if defined(Q_OS_MAC)
yt_is_fallback
=
false
;
#endif
yt
->
setPage
(
newWeb
);
yt
->
setPage
(
newWeb
);
yt
->
setAttribute
(
Qt
::
WA_DeleteOnClose
,
true
);
yt
->
setAttribute
(
Qt
::
WA_DeleteOnClose
,
true
);
yt
->
settings
()
->
setAttribute
(
QWebSettings
::
PluginsEnabled
,
true
);
yt
->
settings
()
->
setAttribute
(
QWebSettings
::
PluginsEnabled
,
true
);
...
...
src/mainwin.h
View file @
e5e406c3
...
@@ -68,6 +68,9 @@ class MainWin : public SkylivexWin
...
@@ -68,6 +68,9 @@ class MainWin : public SkylivexWin
QString
msgsender
;
// The name of the mainwindow for the IPC messages
QString
msgsender
;
// The name of the mainwindow for the IPC messages
WebWin
*
yt
;
// a pointer to the special (singleton) Youtube window (if exists)
WebWin
*
yt
;
// a pointer to the special (singleton) Youtube window (if exists)
bool
yt_is_open
;
// a boolean to indicate if the Youtube window is open
bool
yt_is_open
;
// a boolean to indicate if the Youtube window is open
#if defined(Q_OS_MAC)
bool
yt_if_fallback
;
#endif
void
handle_corestarted
(
SKMessage
&
msg
);
void
handle_corestarted
(
SKMessage
&
msg
);
void
handle_connected
(
SKMessage
&
msg
);
void
handle_connected
(
SKMessage
&
msg
);
void
handle_asklogin
(
SKMessage
&
msg
);
void
handle_asklogin
(
SKMessage
&
msg
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment