Changeset 2f98fe1 in terepaima for terepaima-0.4.16
- Timestamp:
- Mar 15, 2018, 9:53:23 AM (6 years ago)
- Branches:
- stretch
- Parents:
- 30f3152
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
terepaima-0.4.16/sources/mainwindow.cpp
r30f3152 r2f98fe1 127 127 #include <QNetworkReply> 128 128 129 #include <QFileInfo> 129 130 130 131 #include "include/pkcs11.h" … … 2147 2148 { 2148 2149 qDebug("on_properties_sectionCountChanged()"); 2150 m_detailsSignatureView->setModel(view_table_verify_signature()); 2149 2151 if(m_propertiesView->horizontalHeader()->count() > 0) 2150 2152 { … … 4185 4187 4186 4188 qDebug("** on_signature **"); 4189 //verificar si tiene permiso el archiva firmar 4190 QString preview_path = currentTab()->fileInfo().absoluteFilePath(); 4191 qDebug( "** Archivo a firmar: %s", qPrintable(preview_path)); 4192 4193 QFileInfo file(preview_path); 4194 4195 //if(file.permission( QFile::WriteUser | QFile::ReadUser)) 4196 if(!file.isReadable()) { 4197 qDebug("** Entro -> !file.isReadable() **"); 4198 QString msj = "No tiene permiso en el documento"; 4199 QMessageBox msgBox; 4200 msgBox.setText(msj); 4201 msgBox.exec(); 4202 qWarning("No tiene permiso en el documento para realizar la firma"); 4203 return; 4204 } 4205 4206 if(file.isReadable()) { 4207 qDebug("** Entro -> file.isReadable() **"); 4208 } 4209 4210 if(!file.isWritable()) { 4211 qDebug("** Entro -> !isWritable() **"); 4212 QString msj = "No tiene permiso en el documento"; 4213 QMessageBox msgBox; 4214 msgBox.setText(msj); 4215 msgBox.exec(); 4216 qWarning("No tiene permiso en el documento para realizar la firma"); 4217 return; 4218 } 4219 if(file.isWritable()) { 4220 qDebug("** Entro -> file.isWritable() **"); 4221 } 4222 4223 /**QFile file(preview_path); 4224 if(!file.open(QFile::ReadOnly | QFile::Text)) 4225 { 4226 qDebug() << " No se puede firmar porque no tiene permiso de lectura y escritura"; 4227 return; 4228 } **/ 4229 // fin de la verificación 4230 4187 4231 //agragar la función (código) de subir el archivo al servido 4188 4232 on_uploadFile();
Note: See TracChangeset
for help on using the changeset viewer.