mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Some error reporting on divelogs.de export
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									8c706357f4
								
							
						
					
					
						commit
						1d10a56bdf
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -170,6 +170,7 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile,
 | 
				
			||||||
	xslt = get_stylesheet("divelogs-export.xslt");
 | 
						xslt = get_stylesheet("divelogs-export.xslt");
 | 
				
			||||||
	if (!xslt) {
 | 
						if (!xslt) {
 | 
				
			||||||
		qDebug() << errPrefix << "missing stylesheet";
 | 
							qDebug() << errPrefix << "missing stylesheet";
 | 
				
			||||||
 | 
							report_error(tr("stylesheet to export to divelogs.de is not found").toUtf8());
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -238,6 +239,11 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile,
 | 
				
			||||||
		free((void *)membuf);
 | 
							free((void *)membuf);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		transformed = xsltApplyStylesheet(xslt, doc, NULL);
 | 
							transformed = xsltApplyStylesheet(xslt, doc, NULL);
 | 
				
			||||||
 | 
							if (!transformed) {
 | 
				
			||||||
 | 
								qWarning() << errPrefix << "XSLT transform failed for dive: " << i;
 | 
				
			||||||
 | 
								report_error(tr("Conversion of dive %1 to divelogs.de format failed").arg(i).toUtf8());
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		xmlDocDumpMemory(transformed, (xmlChar **)&membuf, &streamsize);
 | 
							xmlDocDumpMemory(transformed, (xmlChar **)&membuf, &streamsize);
 | 
				
			||||||
		xmlFreeDoc(doc);
 | 
							xmlFreeDoc(doc);
 | 
				
			||||||
		xmlFreeDoc(transformed);
 | 
							xmlFreeDoc(transformed);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue