Final fixes. Snapshot should be good now

This commit is contained in:
Niraj Venkat 2015-06-03 15:09:45 -07:00
parent 92248d23e7
commit 4db110a6e1
3 changed files with 4 additions and 12 deletions

View file

@ -3450,9 +3450,6 @@ void Application::displaySide(Camera& theCamera, bool selfAvatarOnly, bool billb
_overlays.renderWorld(true);
}
activeRenderingThread = nullptr;
}

View file

@ -36,8 +36,8 @@ protected:
virtual void showEvent(QShowEvent* event);
virtual void hideEvent(QHideEvent* event);
virtual void changeEvent(QEvent* event);
virtual void dragEnterEvent(QDragEnterEvent *e);
virtual void dropEvent(QDropEvent *e);
virtual void dragEnterEvent(QDragEnterEvent *e);
virtual void dropEvent(QDropEvent *e);
private:
Setting::Handle<QRect> _windowGeometry;

View file

@ -63,6 +63,7 @@ SnapshotMetaData* Snapshot::parseSnapshotData(QString snapshotPath) {
}
QString Snapshot::saveSnapshot(QImage image) {
QFile* snapshotFile = savedFileForSnapshot(image, false);
// we don't need the snapshot file, so close it, grab its filename and delete it
@ -86,10 +87,6 @@ QFile* Snapshot::savedFileForSnapshot(QImage & shot, bool isTemporary) {
QUrl currentURL = DependencyManager::get<AddressManager>()->currentAddress();
shot.setText(URL, currentURL.toString());
QString formattedLocation = QString(currentURL.toString());
// replace decimal . with '-'
formattedLocation.replace('.', '-');
QString username = AccountManager::getInstance().getAccountInfo().getUsername();
// normalize username, replace all non alphanumeric with '-'
username.replace(QRegExp("[^A-Za-z0-9_]"), "-");
@ -110,7 +107,6 @@ QFile* Snapshot::savedFileForSnapshot(QImage & shot, bool isTemporary) {
snapshotFullPath.append(filename);
QFile* imageFile = new QFile(snapshotFullPath);
std::string str = snapshotFullPath.toStdString();
imageFile->open(QIODevice::WriteOnly);
shot.save(imageFile, 0, IMAGE_QUALITY);
@ -118,8 +114,7 @@ QFile* Snapshot::savedFileForSnapshot(QImage & shot, bool isTemporary) {
return imageFile;
}
else {
} else {
QTemporaryFile* imageTempFile = new QTemporaryFile(QDir::tempPath() + "/XXXXXX-" + filename);
if (!imageTempFile->open()) {