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

Remove yt upload support #1

Open
wants to merge 10 commits into
base: remove-yt-password-storage
Choose a base branch
from
1 change: 0 additions & 1 deletion OpenBoard.pro
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ FORMS += resources/forms/mainWindow.ui \
resources/forms/documents.ui \
resources/forms/blackoutWidget.ui \
resources/forms/trapFlash.ui \
resources/forms/youTubePublishingDialog.ui \
resources/forms/capturePublishing.ui \
resources/forms/intranetPodcastPublishingDialog.ui

Expand Down
5 changes: 0 additions & 5 deletions resources/etc/OpenBoard.config
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ UsePDFMerger=true
[Podcast]
AudioRecordingDevice=Default
FramesPerSecond=10
PublishToYouTube=false
QuickTimeQuality=High
VideoSize=Medium
WindowsMediaBitsPerSecond=1700000
Expand All @@ -152,7 +151,3 @@ PrivateBrowsing=false
SearchEngineUrl=https://www.qwant.com/?q=%1
ShowPageImediatelyOnMirroredScreen=false
UseExternalBrowser=false

[YouTube]
CredentialsPersistence=false
UserEMail=
1 change: 0 additions & 1 deletion resources/forms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ target_sources(${PROJECT_NAME} PRIVATE
mainWindow.ui
preferences.ui
trapFlash.ui
youTubePublishingDialog.ui
)
170 changes: 0 additions & 170 deletions resources/forms/youTubePublishingDialog.ui

This file was deleted.

3 changes: 0 additions & 3 deletions src/core/UBApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@

#include "ui_mainWindow.h"

#include "frameworks/UBCryptoUtils.h"
#include "tools/UBToolsManager.h"

#include "UBDisplayManager.h"
Expand Down Expand Up @@ -171,8 +170,6 @@ UBApplication::~UBApplication()

UBSettings::destroy();

UBCryptoUtils::destroy();

UBToolsManager::destroy();

if(mApplicationTranslator != NULL){
Expand Down
66 changes: 11 additions & 55 deletions src/core/UBSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

#include "frameworks/UBPlatformUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBCryptoUtils.h"

#include "UB.h"
#include "UBSetting.h"
Expand Down Expand Up @@ -432,14 +431,13 @@ void UBSettings::init()
podcastWindowsMediaBitsPerSecond = new UBSetting(this, "Podcast", "WindowsMediaBitsPerSecond", 1700000);
podcastQuickTimeQuality = new UBSetting(this, "Podcast", "QuickTimeQuality", "High");

podcastPublishToYoutube = new UBSetting(this, "Podcast", "PublishToYouTube", false);
youTubeUserEMail = new UBSetting(this, "YouTube", "UserEMail", "");
youTubeCredentialsPersistence = new UBSetting(this,"YouTube", "CredentialsPersistence",false);

communityUser = new UBSetting(this, "Community", "Username", "");
communityPsw = new UBSetting(this, "Community", "Password", "");
communityCredentialsPersistence = new UBSetting(this,"Community", "CredentialsPersistence",false);

proxyUser = new UBSetting(this, "Proxy", "UserName", "");
proxyPsw = new UBSetting(this, "Proxy", "Password", "");

QStringList uris = UBToolsManager::manager()->allToolIDs();

favoritesNativeToolUris = new UBSetting(this, "App", "FavoriteToolURIs", uris);
Expand Down Expand Up @@ -1312,75 +1310,35 @@ QNetworkProxy* UBSettings::httpProxy()

proxy->setHostName(mAppSettings->value("Proxy/HostName").toString());
proxy->setPort(mAppSettings->value("Proxy/Port", 1080).toInt());
proxy->setUser(mAppSettings->value("Proxy/UserName").toString());
proxy->setPassword(mAppSettings->value("Proxy/Password").toString());
proxy->setUser(proxyUser->get().toString());
proxy->setPassword(proxyPsw->get().toString());
}

return proxy;
}


void UBSettings::setPassword(const QString& id, const QString& password)
{
QString encrypted = UBCryptoUtils::instance()->symetricEncrypt(password);

mUserSettings->setValue(QString("Vault/") + id, encrypted);
}


void UBSettings::removePassword(const QString& id)
{
mUserSettings->remove(QString("Vault/") + id);
}


QString UBSettings::password(const QString& id)
{
QString encrypted = mUserSettings->value(QString("Vault/") + id).toString();

QString result = "";

if (encrypted.length() > 0)
result = UBCryptoUtils::instance()->symetricDecrypt(encrypted);

return result;
}


QString UBSettings::proxyUsername()
{
QString idUsername = "http.proxy.user";
return password(idUsername);
return proxyUser->get().toString();
}


void UBSettings::setProxyUsername(const QString& username)
{
QString idUsername = "http.proxy.user";

if (username.length() > 0)
setPassword(idUsername, username);
else
removePassword(idUsername);
proxyUser->set(QVariant(username));
}


QString UBSettings::proxyPassword()
{
QString idPassword = "http.proxy.pass";
return password(idPassword);
return proxyPsw->get().toString();
}


void UBSettings::setProxyPassword(const QString& password)
{
QString idPassword = "http.proxy.pass";

if (password.length() > 0)
setPassword(idPassword, password);
else
removePassword(idPassword);

proxyPsw->set(QVariant(password));
}

QString UBSettings::communityUsername()
Expand Down Expand Up @@ -1459,10 +1417,8 @@ void UBSettings::cleanNonPersistentSettings()
communityUser->set(QVariant(""));
}

if(!youTubeCredentialsPersistence->get().toBool()){
removePassword(youTubeUserEMail->get().toString());
youTubeUserEMail->set(QVariant(""));
}
proxyUser->set(QVariant(""));
proxyPsw->set(QVariant(""));
}

/**
Expand Down
11 changes: 3 additions & 8 deletions src/core/UBSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ class UBSettings : public QObject
bool isItalicFont();
void setItalicFont(bool italic);

void setPassword(const QString& id, const QString& password);
QString password(const QString& id);
void removePassword(const QString& id);

QString proxyUsername();
void setProxyUsername(const QString& username);
QString proxyPassword();
Expand Down Expand Up @@ -376,10 +372,6 @@ class UBSettings : public QObject
UBSetting* podcastAudioRecordingDevice;
UBSetting* podcastQuickTimeQuality;

UBSetting* podcastPublishToYoutube;
UBSetting* youTubeUserEMail;
UBSetting* youTubeCredentialsPersistence;

UBSetting* podcastPublishToIntranet;
UBSetting* intranetPodcastPublishingUrl;
UBSetting* intranetPodcastAuthor;
Expand Down Expand Up @@ -412,6 +404,9 @@ class UBSettings : public QObject
UBSetting* communityPsw;
UBSetting* communityCredentialsPersistence;

UBSetting* proxyUser;
UBSetting* proxyPsw;

UBSetting* pageSize;

UBSetting* KeyboardLocale;
Expand Down
2 changes: 0 additions & 2 deletions src/frameworks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ target_sources(openboard PRIVATE
UBBase32.h
UBCoreGraphicsScene.cpp
UBCoreGraphicsScene.h
UBCryptoUtils.cpp
UBCryptoUtils.h
UBFileSystemUtils.cpp
UBFileSystemUtils.h
UBGeometryUtils.cpp
Expand Down
Loading