Example #1
0
TwitPicView::TwitPicView(QWidget *parent) :
    QDialog(parent),
    pixmap( 0 ),
    m_ui(new Ui::TwitPicView)
{
  m_ui->setupUi( this );
  m_ui->uploadProgressBar->setVisible( false );
  m_ui->statusEdit->setAllowEnters( false );
  connect( m_ui->uploadButton, SIGNAL(clicked()), this, SLOT(sendUploadRequest()) );
  connect( m_ui->statusEdit, SIGNAL(enterPressed()), this, SLOT(sendUploadRequest()) );
  connect( m_ui->imagePathEdit, SIGNAL(textChanged(QString)), this, SLOT(setImagePreview(QString)) );
  connect( m_ui->browseButton, SIGNAL(pressed()), this, SLOT(setImagePath()) );

#if QT_VERSION < 0x040500
  m_ui->statusEdit->setMaximumWidth( 150 );
#endif

}
Example #2
0
bool LLWebSharing::receiveSecurityToken(const std::string& token, const std::string& expires)
{
	mSecurityToken["st"] = token;
	mSecurityToken["expires"] = LLDate(expires);

	if (!securityTokenIsValid(mSecurityToken))
	{
		LL_WARNS("WebSharing") << "Invalid security token received: \"" << token << "\" Expires: " << expires << LL_ENDL;
		return false;
	}

	LL_DEBUGS("WebSharing") << "Received security token: \"" << token << "\" Expires: " << expires << LL_ENDL;
	mRetries = 0;

	// Continue the upload process now that we have a security token.
	sendUploadRequest();

	return true;
}